diff options
Diffstat (limited to 'src/xorriso-usb.sh')
-rw-r--r-- | src/xorriso-usb.sh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/xorriso-usb.sh b/src/xorriso-usb.sh index 2b3214f..03c6482 100644 --- a/src/xorriso-usb.sh +++ b/src/xorriso-usb.sh | |||
@@ -12,7 +12,7 @@ efi_dir=$samizdat_grub_efi_dir | |||
12 | 12 | ||
13 | die() { printf "%s: Error: %s\n" "$0" "$*" >&2; exit 1; } | 13 | die() { printf "%s: Error: %s\n" "$0" "$*" >&2; exit 1; } |
14 | 14 | ||
15 | TEMP="$(getopt -o '' --long bootloader,adam,usb,detach,in:,out:,test -n "$0" -- "$@")" || | 15 | TEMP="$(getopt -o '' --long bootloader,reuse-child:,adam,usb,detach,in:,out:,test -n "$0" -- "$@")" || |
16 | die 'getopt error' | 16 | die 'getopt error' |
17 | eval set -- "$TEMP" | 17 | eval set -- "$TEMP" |
18 | 18 | ||
@@ -26,6 +26,7 @@ while [ $# -gt 0 ]; do | |||
26 | --test) shift; QUICK_TEST=y;; | 26 | --test) shift; QUICK_TEST=y;; |
27 | --out) CMDLINE_OUTDEV="$2"; USB=; shift 2;; | 27 | --out) CMDLINE_OUTDEV="$2"; USB=; shift 2;; |
28 | --in) INPUT_DEVICE="$2"; shift 2;; | 28 | --in) INPUT_DEVICE="$2"; shift 2;; |
29 | --reuse-child) REUSE_CHILD=y; child_dir=$samizdat_child_dir/child."$2"; shift 2;; | ||
29 | --) shift; break;; | 30 | --) shift; break;; |
30 | *) die 'getopt error';; | 31 | *) die 'getopt error';; |
31 | esac | 32 | esac |
@@ -139,7 +140,12 @@ grub-efi.sh || die "grub-efi.sh failed" | |||
139 | 140 | ||
140 | choose_outdev | 141 | choose_outdev |
141 | 142 | ||
142 | generate_keys | 143 | if [ "$REUSE_CHILD" ]; then |
144 | gnupghome=$child_dir/root/.gnupg | ||
145 | [ -d "$gnupghome" ] || die "invalid child" | ||
146 | else | ||
147 | generate_keys | ||
148 | fi | ||
143 | 149 | ||
144 | try_mount() | 150 | try_mount() |
145 | { | 151 | { |