You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: root/etc/cont-init.d/30-config
+11-11Lines changed: 11 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ if ip link add dev test type wireguard; then
10
10
SKIP_COMPILE="true"
11
11
ip link del dev test
12
12
else
13
-
echo "**** The wireguard module is not active, will attempt kernel header install and module compilation. ****"
13
+
echo "**** The wireguard module is not active, will attempt kernel header install and module compilation. If you believe that your kernel should have wireguard support already, make sure that it is activated via modprobe! ****"
14
14
fi
15
15
16
16
# install headers if necessary
@@ -30,31 +30,31 @@ if [ "$SKIP_COMPILE" != "true" ] && [ ! -e /lib/modules/$(uname -r)/build ]; the
30
30
apt-get install -y \
31
31
raspberrypi-kernel-headers
32
32
elif uname -v | grep -q 'Ubuntu'; then
33
-
echo "**** Ubuntu kernel detected, but likely not Bionic. ****"
34
-
echo "**** Attempting to install kernel headers from Ubuntu Xenial repo ****"
33
+
echo "**** Ubuntu kernel detected, but likely not Focal. ****"
34
+
echo "**** Attempting to install kernel headers from Ubuntu Bionic repo ****"
35
35
if uname -m | grep -q 'x86_64'; then
36
36
echo -e \
37
-
"deb http://archive.ubuntu.com/ubuntu/ xenial main restricted\ndeb-src http://archive.ubuntu.com/ubuntu/ xenial main restricted\n\ndeb http://archive.ubuntu.com/ubuntu/ xenial-updates main restricted\ndeb-src http://archive.ubuntu.com/ubuntu/ xenial-updates main restricted" \
38
-
> /etc/apt/sources.list.d/xenial-focal.list
37
+
"deb http://archive.ubuntu.com/ubuntu/ bionic main restricted\ndeb-src http://archive.ubuntu.com/ubuntu/ bionic main restricted\n\ndeb http://archive.ubuntu.com/ubuntu/ bionic-updates main restricted\ndeb-src http://archive.ubuntu.com/ubuntu/ bionic-updates main restricted" \
38
+
> /etc/apt/sources.list.d/xenial-bionic.list
39
39
else
40
40
echo -e \
41
-
"deb http://ports.ubuntu.com/ubuntu-ports/ xenial main restricted\ndeb-src http://ports.ubuntu.com/ubuntu-ports/ xenial main restricted\n\ndeb http://ports.ubuntu.com/ubuntu-ports/ xenial-updates main restricted\ndeb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-updates main restricted" \
42
-
> /etc/apt/sources.list.d/xenial-focal.list
41
+
"deb http://ports.ubuntu.com/ubuntu-ports/ bionic main restricted\ndeb-src http://ports.ubuntu.com/ubuntu-ports/ bionic main restricted\n\ndeb http://ports.ubuntu.com/ubuntu-ports/ bionic-updates main restricted\ndeb-src http://ports.ubuntu.com/ubuntu-ports/ bionic-updates main restricted" \
42
+
> /etc/apt/sources.list.d/xenial-bionic.list
43
43
fi
44
44
apt-get update
45
45
if apt-cache show linux-headers-$(uname -r) 2&>1 >/dev/null; then
46
46
apt-get install -y \
47
47
linux-headers-$(uname -r)
48
48
else
49
-
echo "**** No kernel headers found in the Ubuntu Xenial repo!! Trying Ubuntu Focal. ****"
50
-
sed -i 's/xenial/focal/g' /etc/apt/sources.list.d/xenial-focal.list
49
+
echo "**** No kernel headers found in the Ubuntu Bionic repo!! Trying Ubuntu Xenial. ****"
50
+
sed -i 's/bionic/xenial/g' /etc/apt/sources.list.d/xenial-bionic.list
51
51
apt-get update
52
52
if apt-cache show linux-headers-$(uname -r) 2&>1 >/dev/null; then
53
53
apt-get install -y \
54
54
linux-headers-$(uname -r)
55
55
else
56
56
echo "**** No kernel headers found in the Ubuntu repos!! Will try the headers from host (if mapped), may or may not work ****"
57
-
rm -rf /etc/apt/sources.list.d/xenial-focal.list
57
+
rm -rf /etc/apt/sources.list.d/xenial-bionic.list
58
58
fi
59
59
fi
60
60
elif uname -v | grep -q 'Debian'; then
@@ -156,7 +156,7 @@ DUDE
156
156
sleep infinity
157
157
fi
158
158
else
159
-
echo "**** Kernel headers don't seem to be available, can't compile the module. Sleeping now. . . ****"
159
+
echo "**** Kernel headers don't seem to be available in Ubuntu, Debian and Raspbian repos, or shared from the host; therefore can't compile the module. Sleeping now. . . ****"
0 commit comments