summaryrefslogtreecommitdiffstats
path: root/testModule
diff options
context:
space:
mode:
authortorben2015-04-13 20:31:36 +0200
committertorben2015-04-13 20:31:36 +0200
commit794f3c7fb06a67162554941eaea489a1d30f544a (patch)
treee0640ff0e7d1c8cdf2ed73c9f6525cfd91875375 /testModule
parentFix refactoring bugs. (diff)
downloadsystemd-init-794f3c7fb06a67162554941eaea489a1d30f544a.tar.gz
systemd-init-794f3c7fb06a67162554941eaea489a1d30f544a.tar.xz
systemd-init-794f3c7fb06a67162554941eaea489a1d30f544a.zip
Fix hook priority.
Diffstat (limited to 'testModule')
-rw-r--r--testModule/hooks/pre-mount.sh5
-rw-r--r--testModule/module-setup.sh10
2 files changed, 9 insertions, 6 deletions
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