summaryrefslogtreecommitdiff
path: root/src/xorriso-usb.sh
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2016-04-30 02:14:26 -0400
committerAndrew Cady <d@jerkface.net>2016-04-30 02:14:26 -0400
commitc2482125126bb6aeaa9894415a079de89d5fb1aa (patch)
treec5b0c6b0efc87379aedf092518e823b29b8430fc /src/xorriso-usb.sh
parente9960a73da65a93b943e1bacf03f607a6d821680 (diff)
shitty workaround for pxe with inappropriate symlink
i haven't had enough sleep to deal with path changes again
Diffstat (limited to 'src/xorriso-usb.sh')
-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=