diff options
Diffstat (limited to 'src/initrd/patchroot.sh')
-rwxr-xr-x | src/initrd/patchroot.sh | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/src/initrd/patchroot.sh b/src/initrd/patchroot.sh index 738beac..9f0d142 100755 --- a/src/initrd/patchroot.sh +++ b/src/initrd/patchroot.sh | |||
@@ -1,43 +1,7 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | pkgs='avahi-daemon git tmux btrfs-tools/jessie-backports sshfs eject' | ||
4 | pkgs="$pkgs $(cat initrd-dependencies.txt)" | ||
5 | pkgs="$pkgs linux-image-$(uname -r)/jessie-backports" | ||
6 | |||
7 | default_sources_list() | ||
8 | { | ||
9 | cat <<'END' | ||
10 | deb http://httpredir.debian.org/debian jessie main contrib non-free | ||
11 | deb http://security.debian.org jessie/updates main contrib non-free | ||
12 | deb http://httpredir.debian.org/debian jessie-backports main contrib non-free | ||
13 | deb-src http://httpredir.debian.org/debian jessie main contrib non-free | ||
14 | deb-src http://security.debian.org jessie/updates main contrib non-free | ||
15 | deb-src http://httpredir.debian.org/debian jessie-backports main contrib non-free | ||
16 | END | ||
17 | } | ||
18 | |||
19 | network_devs() | ||
20 | { | ||
21 | ip -oneline link | | ||
22 | while read _ dev _; do | ||
23 | echo ${dev%:} | ||
24 | done | ||
25 | } | ||
26 | |||
27 | if [ -e /root/sources.list ]; then | ||
28 | cp /root/sources.list /etc/apt/sources.list | ||
29 | else | ||
30 | default_sources_list > /etc/apt/sources.list | ||
31 | fi | ||
32 | |||
33 | if [ -e /sys/module/hid_apple/parameters/fnmode ]; then | 3 | if [ -e /sys/module/hid_apple/parameters/fnmode ]; then |
34 | echo 2 > /sys/module/hid_apple/parameters/fnmode | 4 | echo 2 > /sys/module/hid_apple/parameters/fnmode |
35 | fi | 5 | fi |
36 | echo options hid_apple fnmode=2 > /etc/modprobe.d/apple.conf | 6 | echo options hid_apple fnmode=2 > /etc/modprobe.d/apple.conf |
37 | 7 | ||
38 | if [ "$(ifquery -a --list)" = lo ]; then | ||
39 | # No configured interfaces. Do something! | ||
40 | dhclient $(network_devs) | ||
41 | fi | ||
42 | apt-get update | ||
43 | apt-get -y install --no-upgrade $pkgs | ||