summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2018-02-07 17:51:56 -0500
committerAndrew Cady <d@jerkface.net>2018-02-07 17:51:56 -0500
commitc6488f409810e5ae96b21120f7328851d05238ca (patch)
tree3bfbc79056723d051212a2bb27e6be26d0479bd8 /src
parent5680150c5204e6f4665232e55e1cc029c53faefe (diff)
rename some variables
Diffstat (limited to 'src')
-rwxr-xr-x[-rw-r--r--]src/xorriso-usb.sh28
1 files changed, 16 insertions, 12 deletions
diff --git a/src/xorriso-usb.sh b/src/xorriso-usb.sh
index 04193e0..5546be0 100644..100755
--- a/src/xorriso-usb.sh
+++ b/src/xorriso-usb.sh
@@ -66,10 +66,10 @@ generate_keys()
66{ 66{
67 if [ "$ADAM" -o "$BOOTLOADER_ONLY" ]; then 67 if [ "$ADAM" -o "$BOOTLOADER_ONLY" ]; then
68 kiki init || die 'kiki init failed' 68 kiki init || die 'kiki init failed'
69 gnupghome=/root/.gnupg 69 GPG_INPUT_DIR=/root/.gnupg
70 else 70 else
71 keygen.sh "$child_dir" || die "keygen.sh failed" 71 keygen.sh "$child_dir" || die "keygen.sh failed"
72 gnupghome=$child_dir/root/.gnupg 72 GPG_INPUT_DIR=$child_dir/root/.gnupg
73 trap 'umount "$child_dir"; rmdir "$child_dir"' EXIT 73 trap 'umount "$child_dir"; rmdir "$child_dir"' EXIT
74 fi 74 fi
75} 75}
@@ -107,9 +107,9 @@ xorriso_cmd()
107 ## that specify sources of input: 107 ## that specify sources of input:
108 108
109 # INPUT_DEVICE 109 # INPUT_DEVICE
110 # gnupghome 110 # GPG_INPUT_DIR
111 # $@ (btrfs filesystems) 111 # $@ (btrfs filesystems)
112 # INPUT_DEVICE_COPIES 112 # EXTRA_INPUT_DIRS
113 113
114 ## boolean flags 114 ## boolean flags
115 115
@@ -127,7 +127,7 @@ xorriso_cmd()
127 -pathspecs on \ 127 -pathspecs on \
128 \ 128 \
129 \ 129 \
130 ${INPUT_DEVICE_COPIES} \ 130 ${EXTRA_INPUT_DIRS} \
131 \ 131 \
132 \ 132 \
133 -rm_r linux -- -add linux="${vmlinuz_dir}" -- \ 133 -rm_r linux -- -add linux="${vmlinuz_dir}" -- \
@@ -136,7 +136,7 @@ xorriso_cmd()
136 \ 136 \
137 \ 137 \
138 -rm_r "${gpg_iso_path}" -- \ 138 -rm_r "${gpg_iso_path}" -- \
139 -add "${gpg_iso_path}=${gnupghome}" -- \ 139 -add "${gpg_iso_path}=${GPG_INPUT_DIR}" -- \
140 \ 140 \
141 \ 141 \
142 -chown_r 0 / -- \ 142 -chown_r 0 / -- \
@@ -173,6 +173,10 @@ find_child()
173 173
174. samizdat-paths.sh || die 'samizdat-path.sh not found' 174. samizdat-paths.sh || die 'samizdat-path.sh not found'
175 175
176if [ -f xorriso-usb.config ]; then
177 . xorriso-usb.config
178fi
179
176volid=SamizdatLive 180volid=SamizdatLive
177vmlinuz_dir=$samizdat_linux_dir 181vmlinuz_dir=$samizdat_linux_dir
178efi_dir=$samizdat_grub_efi_dir 182efi_dir=$samizdat_grub_efi_dir
@@ -180,7 +184,7 @@ gpg_iso_path=gnupghome
180 184
181 185
182outdev= 186outdev=
183gnupghome= 187GPG_INPUT_DIR=
184child_dir=$samizdat_child_dir/child.$$ 188child_dir=$samizdat_child_dir/child.$$
185 189
186eval set -- "$(getopt -o '' --long bootloader,reuse-child:,adam,usb,detach,in:,out:,test -n "$0" -- "$@")" || 190eval set -- "$(getopt -o '' --long bootloader,reuse-child:,adam,usb,detach,in:,out:,test -n "$0" -- "$@")" ||
@@ -238,8 +242,8 @@ grub-efi.sh || die "grub-efi.sh failed"
238choose_outdev 242choose_outdev
239 243
240if [ "$REUSE_CHILD" ]; then 244if [ "$REUSE_CHILD" ]; then
241 gnupghome=$child_dir/root/.gnupg 245 GPG_INPUT_DIR=$child_dir/root/.gnupg
242 [ -d "$gnupghome" ] || die "invalid child" 246 [ -d "$GPG_INPUT_DIR" ] || die "invalid child"
243else 247else
244 generate_keys 248 generate_keys
245fi 249fi
@@ -247,12 +251,12 @@ fi
247if [ "$INPUT_DEVICE" ]; then 251if [ "$INPUT_DEVICE" ]; then
248 if [ "$INPUT_DEVICE" = /dev/md55 ]; then 252 if [ "$INPUT_DEVICE" = /dev/md55 ]; then
249 if mountpoint -q /cdrom; then 253 if mountpoint -q /cdrom; then
250 INPUT_DEVICE_COPIES='-add /=/cdrom --' 254 EXTRA_INPUT_DIRS='-add /=/cdrom --'
251 fi 255 fi
252 elif [ -d "$INPUT_DEVICE" ]; then 256 elif [ -d "$INPUT_DEVICE" ]; then
253 INPUT_DEVICE_COPIES="-add /=$INPUT_DEVICE --" # TODO: escape 257 EXTRA_INPUT_DIRS="-add /=$INPUT_DEVICE --" # TODO: escape
254 elif try_mount "$INPUT_DEVICE"; then 258 elif try_mount "$INPUT_DEVICE"; then
255 INPUT_DEVICE_COPIES='-add /=/mnt --' 259 EXTRA_INPUT_DIRS='-add /=/mnt --'
256 else 260 else
257 REPLACE_INITRD= 261 REPLACE_INITRD=
258 REMOVE_BTRFS= 262 REMOVE_BTRFS=