diff options
Diffstat (limited to 'initramfs-tools/scripts')
-rw-r--r-- | initramfs-tools/scripts/samizdat | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/initramfs-tools/scripts/samizdat b/initramfs-tools/scripts/samizdat index 51f7cec..93c84d2 100644 --- a/initramfs-tools/scripts/samizdat +++ b/initramfs-tools/scripts/samizdat | |||
@@ -16,6 +16,28 @@ my_configure_networking() | |||
16 | fi | 16 | fi |
17 | } | 17 | } |
18 | 18 | ||
19 | read_nbd_variables() | ||
20 | { | ||
21 | NBDCLIENT=: | ||
22 | . /scripts/local-top/nbd | ||
23 | unset NBDCLIENT | ||
24 | } | ||
25 | |||
26 | run_nbd_client() | ||
27 | { | ||
28 | (debug_log samizdat.nbd | ||
29 | read_nbd_variables | ||
30 | for DEVNAME in /dev/nbd0 /dev/nbd1 | ||
31 | do | ||
32 | case "$DEVNAME" in | ||
33 | /dev/nbd0) nbdpath=samizdat.btrfs ;; | ||
34 | /dev/nbd1) nbdpath=samizdat.patch.btrfs ;; | ||
35 | esac | ||
36 | nbd-client $nbdsrv -N $nbdpath $nbdport $DEVNAME -swap -persist -systemd-mark | ||
37 | done | ||
38 | bootdone nbd-script) | ||
39 | } | ||
40 | |||
19 | mountroot() | 41 | mountroot() |
20 | { | 42 | { |
21 | openvt -c 13 sh | 43 | openvt -c 13 sh |
@@ -24,10 +46,7 @@ mountroot() | |||
24 | 46 | ||
25 | if [ "$nbdroot" ]; then | 47 | if [ "$nbdroot" ]; then |
26 | my_configure_networking | 48 | my_configure_networking |
27 | 49 | run_nbd_client | |
28 | (debug_log samizdat.nbd | ||
29 | . /scripts/local-top/nbd | ||
30 | bootdone nbd-script) | ||
31 | 50 | ||
32 | wait_for_gnupghome_tar | 51 | wait_for_gnupghome_tar |
33 | (sleep 5; echo ) & | 52 | (sleep 5; echo ) & |
@@ -56,6 +75,7 @@ wait_for_gnupghome_tar() | |||
56 | done | 75 | done |
57 | mv /gnupghome.tar.$$ /gnupghome.tar) | 76 | mv /gnupghome.tar.$$ /gnupghome.tar) |
58 | echo ' done.' > /dev/tty1 | 77 | echo ' done.' > /dev/tty1 |
78 | bootdone gnupg-tar | ||
59 | } | 79 | } |
60 | 80 | ||
61 | samizdat_restart_udev() | 81 | samizdat_restart_udev() |