diff options
| author | torben | 2015-04-13 19:55:58 +0200 |
|---|---|---|
| committer | torben | 2015-04-13 19:55:58 +0200 |
| commit | 105f29aa50fe7d3324cb109714af7d0b3c2c27df (patch) | |
| tree | 22d2253071223b7897a50be86ab0efd74139578b | |
| parent | Adding remotly notifyable test initramfs service. (diff) | |
| download | systemd-init-105f29aa50fe7d3324cb109714af7d0b3c2c27df.tar.gz systemd-init-105f29aa50fe7d3324cb109714af7d0b3c2c27df.tar.xz systemd-init-105f29aa50fe7d3324cb109714af7d0b3c2c27df.zip | |
Adding endless test service. Fix some naming conventions.
| -rwxr-xr-x | testModule/endless | bin | 0 -> 6752 bytes | |||
| -rw-r--r-- | testModule/endless.c | 10 | ||||
| -rw-r--r-- | testModule/module-setup.sh | 6 | ||||
| -rw-r--r-- | testModule/pre-mount.sh (renamed from testModule/mount-dnbd3.sh) | 10 | ||||
| -rw-r--r-- | testModule/pre-pivot.sh | 3 | ||||
| -rwxr-xr-x | testModule/test-service.sh | 6 | ||||
| -rw-r--r-- | testModule/wrap.c | 3 |
7 files changed, 23 insertions, 15 deletions
diff --git a/testModule/endless b/testModule/endless Binary files differnew file mode 100755 index 00000000..e3c61074 --- /dev/null +++ b/testModule/endless diff --git a/testModule/endless.c b/testModule/endless.c new file mode 100644 index 00000000..e3598e88 --- /dev/null +++ b/testModule/endless.c @@ -0,0 +1,10 @@ +#include <unistd.h> +#include <stdlib.h> +#include <string.h> +#include <stdio.h> + +int main(int argc, char *argv[]) { + // argv[0][0] = '@'; + while (1) + sleep(5); +} diff --git a/testModule/module-setup.sh b/testModule/module-setup.sh index d0086300..1718cca3 100644 --- a/testModule/module-setup.sh +++ b/testModule/module-setup.sh @@ -30,15 +30,17 @@ install() { inst "$moddir/library.sh" /usr/lib/test-library.sh inst "$moddir/process-name-wrapper.sh" /usr/bin/process-name-wrapper inst "$moddir/wrap" /usr/bin/wrap + inst "$moddir/endless" /usr/bin/endless inst "$moddir/dnbd3-client" /usr/bin/dnbd3-client inst "$moddir/dnbd3.ko" /usr/lib/modules/3.10.0-229.1.2.el7.x86_64/extra/dnbd3.ko inst "$moddir/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 # since we have to modify the some kernel parameter before. inst_hook cmdline 100 "$moddir/parse-ip.sh" - inst_hook pre-mount 100 "$moddir/mount-dnbd3.sh" + inst_hook pre-mount 100 "$moddir/pre-mount.sh" + inst_hook pre-pivot 100 "$moddir/pre-pivot.sh" inst_simple "$moddir/busybox" /usr/bin/busybox #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 + 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 return 0 } diff --git a/testModule/mount-dnbd3.sh b/testModule/pre-mount.sh index c8b7f267..301381e6 100644 --- a/testModule/mount-dnbd3.sh +++ b/testModule/pre-mount.sh @@ -1,6 +1,5 @@ # TODO -warn '............JAU.............' -warn '............JAU.............' +warn '............START.............' insmod /usr/lib/modules/3.10.0-229.1.2.el7.x86_64/extra/dnbd3.ko @@ -8,7 +7,8 @@ insmod /usr/lib/modules/3.10.0-229.1.2.el7.x86_64/extra/dnbd3.ko #sleep 3 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 /tmp/test.qcow2 +qemu-img create -f qcow2 -o backing_file="$dnbd3_device_node",backing_fmt=qcow2 /test.qcow2 insmod /usr/lib/modules/3.10.0-229.1.2.el7.x86_64/extra/nbd.ko -wrap qemu-nbd -c /dev/nbd0 /tmp/test.qcow2 -#mount /dev/nbd0 /sysroot +wrap qemu-nbd -c /dev/nbd0 /test.qcow2 + +#wrap /usr/bin/bash -c 'while true; do wget http://10.126.2.184:8080; sleep 10; done' & diff --git a/testModule/pre-pivot.sh b/testModule/pre-pivot.sh new file mode 100644 index 00000000..c868fc30 --- /dev/null +++ b/testModule/pre-pivot.sh @@ -0,0 +1,3 @@ +# TODO +warn '............MOUNT.............' +mount /dev/nbd0 /sysroot/mnt diff --git a/testModule/test-service.sh b/testModule/test-service.sh deleted file mode 100755 index cc81da9e..00000000 --- a/testModule/test-service.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/bash - -while true; do - wget http://10.126.2.184:8080 - sleep 2 -done diff --git a/testModule/wrap.c b/testModule/wrap.c index 51ca2d8c..bfb0b881 100644 --- a/testModule/wrap.c +++ b/testModule/wrap.c @@ -7,10 +7,9 @@ void arg_print(int argc, char *argv[]) { int i = 0; int j = 0; for (i = 0; i < argc; i ++) { - j = 0; + j = 0; while(argv[i][j] != '\0') printf("%c", argv[i][j++]); - printf(" "); } printf("\n"); |
