diff options
author | Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> | 2011-08-29 15:27:03 -0300 |
---|---|---|
committer | Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> | 2011-08-29 17:03:00 -0300 |
commit | a55fc14e24d6ed07961766e36fd45331bbeea7bc (patch) | |
tree | 51eee4b0a54686bceb59d6e2eed042e04a32a319 | |
parent | 14743f4202eeffca4d80105c7e7ad91bc0af4e88 (diff) | |
download | archiso32-a55fc14e24d6ed07961766e36fd45331bbeea7bc.tar.xz |
[archiso] Integrate omit_kill_nbd_client logic in hook.
This makes archiso_pxe_nbd functionallity full-independient from
archiso profiles (configs/*).
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
-rw-r--r-- | archiso/Makefile | 2 | ||||
-rw-r--r-- | archiso/archiso_pxe_nbd | 6 | ||||
-rw-r--r-- | archiso/hooks/archiso_pxe_nbd | 1 | ||||
-rw-r--r-- | archiso/install/archiso_pxe_nbd | 2 | ||||
-rwxr-xr-x | configs/releng/build.sh | 1 | ||||
-rw-r--r-- | configs/releng/root-image/etc/rc.d/functions.d/omit_kill_nbd_client | 8 |
6 files changed, 12 insertions, 8 deletions
diff --git a/archiso/Makefile b/archiso/Makefile index a751acd..4e8291e 100644 --- a/archiso/Makefile +++ b/archiso/Makefile @@ -12,6 +12,7 @@ install-hooks: # hooks/install are needed by mkinitcpio install -D -m 644 hooks/archiso $(DESTDIR)/lib/initcpio/hooks/archiso install -D -m 644 install/archiso $(DESTDIR)/lib/initcpio/install/archiso + install -D -m 644 archiso_pxe_nbd $(DESTDIR)/lib/initcpio/archiso_pxe_nbd install -D -m 644 hooks/archiso_pxe_nbd $(DESTDIR)/lib/initcpio/hooks/archiso_pxe_nbd install -D -m 644 install/archiso_pxe_nbd $(DESTDIR)/lib/initcpio/install/archiso_pxe_nbd install -D -m 644 hooks/archiso_loop_mnt $(DESTDIR)/lib/initcpio/hooks/archiso_loop_mnt @@ -31,6 +32,7 @@ uninstall: rm -f $(DESTDIR)/usr/bin/testiso rm -f $(DESTDIR)/lib/initcpio/hooks/archiso rm -f $(DESTDIR)/lib/initcpio/install/archiso + rm -f $(DESTDIR)/lib/initcpio/archiso_pxe_nbd rm -f $(DESTDIR)/lib/initcpio/hooks/archiso_pxe_nbd rm -f $(DESTDIR)/lib/initcpio/install/archiso_pxe_nbd rm -f $(DESTDIR)/lib/initcpio/hooks/archiso_loop_mnt diff --git a/archiso/archiso_pxe_nbd b/archiso/archiso_pxe_nbd new file mode 100644 index 0000000..e6b9872 --- /dev/null +++ b/archiso/archiso_pxe_nbd @@ -0,0 +1,6 @@ +omit_kill_nbd_client() { + add_omit_pids $(< /run/archiso/nbd_client.pid) +} + +add_hook shutdown_prekillall omit_kill_nbd_client +add_hook single_prekillall omit_kill_nbd_client diff --git a/archiso/hooks/archiso_pxe_nbd b/archiso/hooks/archiso_pxe_nbd index 3fe988a..e3e27e7 100644 --- a/archiso/hooks/archiso_pxe_nbd +++ b/archiso/hooks/archiso_pxe_nbd @@ -91,5 +91,6 @@ archiso_pxe_nbd_mount_handler () { else mkdir -p /run/archiso pidof nbd-client > /run/archiso/nbd_client.pid + cp /archiso_pxe_nbd ${newroot}/etc/rc.d/functions.d/ fi } diff --git a/archiso/install/archiso_pxe_nbd b/archiso/install/archiso_pxe_nbd index c8ba1a4..69a12ce 100644 --- a/archiso/install/archiso_pxe_nbd +++ b/archiso/install/archiso_pxe_nbd @@ -14,6 +14,8 @@ build () add_binary "/usr/sbin/nbd-client" "/bin/nbd-client" add_binary "/lib/initcpio/ipconfig" "/bin/ipconfig" + + add_file "/lib/initcpio/archiso_pxe_nbd" "/archiso_pxe_nbd" } help () diff --git a/configs/releng/build.sh b/configs/releng/build.sh index e2ee1f9..fa7d13c 100755 --- a/configs/releng/build.sh +++ b/configs/releng/build.sh @@ -47,6 +47,7 @@ make_setup_mkinitcpio() { cp /lib/initcpio/hooks/${_hook} ${work_dir}/root-image/lib/initcpio/hooks cp /lib/initcpio/install/${_hook} ${work_dir}/root-image/lib/initcpio/install done + cp /lib/initcpio/archiso_pxe_nbd ${work_dir}/root-image/lib/initcpio : > ${work_dir}/build.${FUNCNAME} fi } diff --git a/configs/releng/root-image/etc/rc.d/functions.d/omit_kill_nbd_client b/configs/releng/root-image/etc/rc.d/functions.d/omit_kill_nbd_client deleted file mode 100644 index 60a1192..0000000 --- a/configs/releng/root-image/etc/rc.d/functions.d/omit_kill_nbd_client +++ /dev/null @@ -1,8 +0,0 @@ -if [[ -f /run/archiso/nbd_client.pid ]]; then - omit_kill_nbd_client() { - add_omit_pids $(< /run/archiso/nbd_client.pid) - } - - add_hook shutdown_prekillall omit_kill_nbd_client - add_hook single_prekillall omit_kill_nbd_client -fi |