diff options
Diffstat (limited to 'archiso')
-rw-r--r-- | archiso/archiso_pxe_nbd | 6 | ||||
-rw-r--r-- | archiso/archiso_shutdown | 3 | ||||
-rw-r--r-- | archiso/hooks/archiso_pxe_nbd | 18 | ||||
-rw-r--r-- | archiso/install/archiso_pxe_nbd | 2 |
4 files changed, 5 insertions, 24 deletions
diff --git a/archiso/archiso_pxe_nbd b/archiso/archiso_pxe_nbd deleted file mode 100644 index e6b9872..0000000 --- a/archiso/archiso_pxe_nbd +++ /dev/null @@ -1,6 +0,0 @@ -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/archiso_shutdown b/archiso/archiso_shutdown index 85cce59..41b3945 100644 --- a/archiso/archiso_shutdown +++ b/archiso/archiso_shutdown @@ -27,9 +27,6 @@ if [[ ! -d /oldrun/archiso/copytoram ]]; then else umount /oldrun/archiso/bootmnt fi - if [[ -f /oldrun/archiso/nbd_client.pid ]]; then - nbd-client -d /dev/nbd0 - fi fi # reboot / poweroff / halt, depending on the argument passed by init diff --git a/archiso/hooks/archiso_pxe_nbd b/archiso/hooks/archiso_pxe_nbd index 6147d06..a9f84d5 100644 --- a/archiso/hooks/archiso_pxe_nbd +++ b/archiso/hooks/archiso_pxe_nbd @@ -15,6 +15,7 @@ archiso_pxe_nbd_mount_handler () { # Module autoloading like with loop devices does not work, doing manually... modprobe nbd 2> /dev/null + msg ":: Waiting for boot device..." while ! poll_device /dev/nbd0 30; do echo "ERROR: boot device didn't show up after 30 seconds..." @@ -24,22 +25,13 @@ archiso_pxe_nbd_mount_handler () { done msg ":: Setup NBD from ${archiso_nbd_srv} at /dev/nbd0" - if [[ "${copytoram}" = "y" ]]; then - nbd-client ${archiso_nbd_srv} -N ${archiso_nbd_name} /dev/nbd0 - else - nbd-client ${archiso_nbd_srv} -N ${archiso_nbd_name} /dev/nbd0 -persist - fi + nbd-client ${archiso_nbd_srv} -N ${archiso_nbd_name} /dev/nbd0 + copytoram="y" archisodevice=/dev/nbd0 archiso_mount_handler ${newroot} - if [[ "${copytoram}" = "y" ]]; then - msg ":: Disconnect NBD from ${archiso_nbd_srv} at /dev/nbd0" - nbd-client -d /dev/nbd0 - else - mkdir -p /run/archiso - pidof nbd-client > /run/archiso/nbd_client.pid - cp /archiso_pxe_nbd ${newroot}/etc/rc.d/functions.d/ - fi + msg ":: Disconnect NBD from ${archiso_nbd_srv} at /dev/nbd0" + nbd-client -d /dev/nbd0 } diff --git a/archiso/install/archiso_pxe_nbd b/archiso/install/archiso_pxe_nbd index 8d9552a..47d98ce 100644 --- a/archiso/install/archiso_pxe_nbd +++ b/archiso/install/archiso_pxe_nbd @@ -6,8 +6,6 @@ build() { add_runscript add_binary nbd-client - - add_file /usr/lib/initcpio/archiso_pxe_nbd /archiso_pxe_nbd } help() { |