summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--initramfs-tools/scripts/samizdat10
-rwxr-xr-xsrc/initrd/grok-block10
2 files changed, 13 insertions, 7 deletions
diff --git a/initramfs-tools/scripts/samizdat b/initramfs-tools/scripts/samizdat
index ea31c9f..1591883 100644
--- a/initramfs-tools/scripts/samizdat
+++ b/initramfs-tools/scripts/samizdat
@@ -6,8 +6,12 @@ mountroot()
6 6
7 samizdat_install_udev_rules 7 samizdat_install_udev_rules
8 mkfifo "$MENUFIFO" 8 mkfifo "$MENUFIFO"
9 sh /scripts/local-top/nbd & # I guess this isn't getting called otherwise? 9 sh /scripts/local-top/nbd >/dev/null 2>&1 & # I guess this isn't getting called otherwise?
10 wait_for_gnupghome_tar 10
11 if [ "${nbdroot%%,*}" ]; then
12 wait_for_gnupghome_tar
13 fi
14
11 bootmenu 15 bootmenu
12 bootwait root-mounted 16 bootwait root-mounted
13 chvt 1 17 chvt 1
@@ -16,7 +20,6 @@ mountroot()
16wait_for_gnupghome_tar() 20wait_for_gnupghome_tar()
17{ 21{
18 [ -e /gnupghome.tar ] && return 22 [ -e /gnupghome.tar ] && return
19 [ "${nbdroot%%,*}" ] || return
20 echo -n Waiting to receive GPG keys through the network... 23 echo -n Waiting to receive GPG keys through the network...
21 (while ! tftp -g -r gnupghome.tar -l /gnupghome.tar.$$ ${nbdroot%%,*} 2>/dev/null; do 24 (while ! tftp -g -r gnupghome.tar -l /gnupghome.tar.$$ ${nbdroot%%,*} 2>/dev/null; do
22 sleep 1; 25 sleep 1;
@@ -24,6 +27,7 @@ wait_for_gnupghome_tar()
24 done 27 done
25 mv /gnupghome.tar.$$ /gnupghome.tar) 28 mv /gnupghome.tar.$$ /gnupghome.tar)
26 echo ' done.' 29 echo ' done.'
30 (. common.sh && . btrfs-create.sh && init_gpg)
27} 31}
28 32
29samizdat_install_udev_rules() 33samizdat_install_udev_rules()
diff --git a/src/initrd/grok-block b/src/initrd/grok-block
index e573c91..93770d5 100755
--- a/src/initrd/grok-block
+++ b/src/initrd/grok-block
@@ -135,10 +135,12 @@ grok_block()
135 if [ "$freemegs" -ge 300 ]; then 135 if [ "$freemegs" -ge 300 ]; then
136 136
137 umount=false 137 umount=false
138 bootwait samizdat-cdrom 138 # bootwait samizdat-cdrom
139 cdromblocks=$(stat -f -c %b /cdrom) 139 # cdromblocks=$(stat -f -c %b /cdrom)
140 cdromblocksize=$(stat -f -c %S /cdrom) 140 # cdromblocksize=$(stat -f -c %S /cdrom)
141 cdrommegs=$((cdromblocks * cdromblocksize / 1024 / 1024)) 141 # cdrommegs=$((cdromblocks * cdromblocksize / 1024 / 1024))
142
143 cdrommegs=700 # TODO: go back to checking the size
142 144
143 if [ "$freemegs" -ge "$((cdrommegs * 3))" ]; then 145 if [ "$freemegs" -ge "$((cdrommegs * 3))" ]; then
144 addmenu_makeroot "$DEVNAME" "${mountpoint}/samizdat.$N" "$((cdrommegs * 3))" 1 146 addmenu_makeroot "$DEVNAME" "${mountpoint}/samizdat.$N" "$((cdrommegs * 3))" 1