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