diff options
| author | torben | 2015-04-13 20:31:36 +0200 |
|---|---|---|
| committer | torben | 2015-04-13 20:31:36 +0200 |
| commit | 794f3c7fb06a67162554941eaea489a1d30f544a (patch) | |
| tree | e0640ff0e7d1c8cdf2ed73c9f6525cfd91875375 | |
| parent | Fix refactoring bugs. (diff) | |
| download | systemd-init-794f3c7fb06a67162554941eaea489a1d30f544a.tar.gz systemd-init-794f3c7fb06a67162554941eaea489a1d30f544a.tar.xz systemd-init-794f3c7fb06a67162554941eaea489a1d30f544a.zip | |
Fix hook priority.
| -rw-r--r-- | readme.md | 2 | ||||
| -rw-r--r-- | testModule/hooks/pre-mount.sh | 5 | ||||
| -rw-r--r-- | testModule/module-setup.sh | 10 |
3 files changed, 11 insertions, 6 deletions
@@ -306,3 +306,5 @@ dnbd3-client -h 132.230.4.1 -i stage4/torben/test -r 1 > # Installiere qemu-img: @yum install qemu-img@ > # Installiere nbd: @wget http://dl.fedoraproject.org/pub/epel/6/x86_64/nbd-2.9.20-7.el6.x86_64.rpm && rpm -Uvh nbd-2.9.20-7.el6.x86_64.rpm@ + +NOTE: Disable NetworkManager to avoid reloading network on boot: systemctl disable NetworkManager diff --git a/testModule/hooks/pre-mount.sh b/testModule/hooks/pre-mount.sh index 79ae47fa..0bf80e16 100644 --- a/testModule/hooks/pre-mount.sh +++ b/testModule/hooks/pre-mount.sh @@ -4,6 +4,7 @@ warn '............START.............' insmod /usr/lib/modules/3.10.0-229.1.2.el7.x86_64/extra/dnbd3.ko local dnbd3_device_node="$(dnbd3-client -h 132.230.4.1 -i stage4/torben/test -r 1 -d /dev/dnbd0)" dnbd3_device_node='/dev/dnbd0' -qemu-img create -f qcow2 -o backing_file="$dnbd3_device_node",backing_fmt=qcow2 /test.qcow2 +# TODO sysroot normally not available yet. +qemu-img create -f qcow2 -o backing_file="$dnbd3_device_node",backing_fmt=qcow2 /sysroot/test.qcow2 insmod /usr/lib/modules/3.10.0-229.1.2.el7.x86_64/extra/nbd.ko -systemd_preserve_process_marker qemu-nbd -c /dev/nbd0 /test.qcow2 +systemd_preserve_process_marker qemu-nbd -c /dev/nbd0 /sysroot/test.qcow2 diff --git a/testModule/module-setup.sh b/testModule/module-setup.sh index 5e0696b4..698ebf62 100644 --- a/testModule/module-setup.sh +++ b/testModule/module-setup.sh @@ -34,11 +34,13 @@ install() { inst "$moddir/binaries/busybox" /usr/bin/busybox inst "$moddir/kernel_modules/dnbd3.ko" /usr/lib/modules/3.10.0-229.1.2.el7.x86_64/extra/dnbd3.ko inst "$moddir/kernel_modules/nbd.ko" /usr/lib/modules/3.10.0-229.1.2.el7.x86_64/extra/nbd.ko - # NOTE: Priority has to be greater than the network cmdline parsing hooks + # NOTE: Priority has to be lower than the network cmdline parsing hooks # since we have to modify the some kernel parameter before. - inst_hook cmdline 100 "$moddir/hooks/cmdline.sh" - inst_hook pre-mount 100 "$moddir/hooks/pre-mount.sh" - inst_hook pre-pivot 100 "$moddir/hooks/pre-pivot.sh" + inst_hook cmdline 1 "$moddir/hooks/cmdline.sh" + # TODO pre-pivot to pre-mount + inst_hook pre-pivot 10 "$moddir/hooks/pre-mount.sh" + # TODO 11 to 10 + inst_hook pre-pivot 11 "$moddir/hooks/pre-pivot.sh" #inst_hook pre-mount 20 "$moddir/setup_network.sh" inst_multiple lsblk ping ip ifconfig sshd htop dhclient tail head cat vim touch sed lsmod insmod qemu-img qemu-nbd sleep route wget find # FINAL: inst_multiple insmod qemu-img qemu-nbd |
