summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/xorriso-usb.sh13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/xorriso-usb.sh b/src/xorriso-usb.sh
index 100288d..ef26cb2 100644
--- a/src/xorriso-usb.sh
+++ b/src/xorriso-usb.sh
@@ -31,7 +31,9 @@ while [ $# -gt 0 ]; do
31done 31done
32 32
33if [ -z "$INPUT_DEVICE" -a $# = 0 ]; then 33if [ -z "$INPUT_DEVICE" -a $# = 0 ]; then
34 if [ -e debian-live-8.4.0-amd64-standard.btrfs -a -e layer.btrfs ]; then 34 if mountpoint -q /cdrom; then
35 INPUT_DEVICE=/cdrom
36 elif [ -e debian-live-8.4.0-amd64-standard.btrfs -a -e layer.btrfs ]; then
35 set -- debian-live-8.4.0-amd64-standard.btrfs layer.btrfs 37 set -- debian-live-8.4.0-amd64-standard.btrfs layer.btrfs
36 else 38 else
37 die "no input device and no input btrfs layers: aborting." 39 die "no input device and no input btrfs layers: aborting."
@@ -164,7 +166,14 @@ if [ "$QUICK_TEST" ]; then
164fi 166fi
165 167
166if [ "$REPLACE_INITRD" ]; then 168if [ "$REPLACE_INITRD" ]; then
167 initrd.sh || die 'initrd.sh failed' 169 # TODO: fix the paths so this backup isn't needed. What we need to do is
170 # support tftp pointing to the cdrom. This probably means a tftp directory
171 # that contains a symlink to /cdrom/linux which gets updated on success here
172 mv "${vmlinuz_dir}" "${vmlinuz_dir}".bak
173 initrd.sh || {
174 mv "${vmlinuz_dir}.bak" "${vmlinuz_dir}"
175 die 'initrd.sh failed'
176 }
168fi 177fi
169 178
170SILENT= 179SILENT=