diff options
| author | torben | 2015-05-04 13:57:16 +0200 |
|---|---|---|
| committer | torben | 2015-05-04 13:57:16 +0200 |
| commit | 0ddd93e6daec1c2eadb025bbc7ab90b9e865516c (patch) | |
| tree | 58d84520e5a7f802f1fc0abdca7933f47c4d5b4d /testModule/hooks/cmdline.sh | |
| parent | Pepare merge. (diff) | |
| parent | working version - STILL TESTING (diff) | |
| download | systemd-init-0ddd93e6daec1c2eadb025bbc7ab90b9e865516c.tar.gz systemd-init-0ddd93e6daec1c2eadb025bbc7ab90b9e865516c.tar.xz systemd-init-0ddd93e6daec1c2eadb025bbc7ab90b9e865516c.zip | |
Merge branch 'master' of git.openslx.org:openslx-ng/systemd-init
Diffstat (limited to 'testModule/hooks/cmdline.sh')
| -rwxr-xr-x | testModule/hooks/cmdline.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/testModule/hooks/cmdline.sh b/testModule/hooks/cmdline.sh new file mode 100755 index 00000000..b1f06ea6 --- /dev/null +++ b/testModule/hooks/cmdline.sh @@ -0,0 +1,22 @@ +echo 1 > /proc/sys/kernel/sysrq + +# fakes the cmdline to fix the ip parsing when using +# syslinux's IPAPPEND 1 mask +[ -d /fake ] || mkdir /fake + +# need to be a tmpfs for the hack to work +mount -t tmpfs tmpfs /fake + +# append ':hiwi:eth0:none' to the 'ip=' parameter we got +# from syslinux's IPAPPEND 1 +sed 's/\(ip=\([0-9]\{1,3\}\.\)\{3\}[0-9]\{1,3\}:\([0-9]\{1,3\}\.\)\{3\}[0-9]\{1,3\}:\([0-9]\{1,3\}\.\)\{3\}[0-9]\{1,3\}:\([0-9]\{1,3\}\.\)\{3\}[0-9]\{1,3\}\)/\1:hiwi:eno1:none/' /proc/cmdline > /fake/cmdline + +# bind mount it. Can we trust mount return codes here? +# if so, we should check what we get in $? +mount -o bind /fake/cmdline /proc/cmdline + +# check if it worked +if ! grep 'hiwi:eth0:none' /proc/cmdline; then + command -v warn >/dev/null || . /lib/dracut-lib.sh + warn 'Haxing cmdline did not work :( sad pandaz...' +fi |
