-
Notifications
You must be signed in to change notification settings - Fork 0
/
bare-runme.sh
61 lines (48 loc) · 1.63 KB
/
bare-runme.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/bash
export DEBIAN_FRONTEND=noninteractive
bash
# another workaround2
apt -y remove needrestart
apt -y purge needrestart
echo "needsrestart"
#sudo sed -i 's/groovy/hirsute/g' /etc/apt/sources.list
sudo sed -i 's/groovy/impish/g' /etc/apt/sources.list
apt update
#apt -y upgrade
apt -y dist-upgrade
rm /var/run/reboot-required*
bash
cat > /etc/update-manager/release-upgrades << EOF
# Default behavior for the release upgrader.
[DEFAULT]
# Default prompting and upgrade behavior, valid options:
#
# never - Never check for, or allow upgrading to, a new release.
# normal - Check to see if a new release is available. If more than one new
# release is found, the release upgrader will attempt to upgrade to
# the supported release that immediately succeeds the
# currently-running release.
# lts - Check to see if a new LTS release is available. The upgrader
# will attempt to upgrade to the first LTS release available after
# the currently-running one. Note that if this option is used and
# the currently-running release is not itself an LTS release the
# upgrader will assume prompt was meant to be normal.
Prompt=normal
EOF
apt -y update
apt -y autoremove
apt -y install fake-hwclock rng-tools haveged
systemctl disable rng-tools.service
cat > /etc/systemd/system/rng-tools.service << EOF
[Unit]
Description=Add entropy to /dev/random 's pool a hardware RNG
[Service]
Type=simple
ExecStart=/usr/sbin/rngd -r /dev/hwrng -f
[Install]
WantedBy=systemd-random-seed.service
EOF
systemctl enable rng-tools.service
bash
#do-release-upgrade
#apt -y install needrestart