Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Griffin <aaronmgriffin@gmail.com>2008-12-23 02:17:59 -0600
committerAaron Griffin <aaronmgriffin@gmail.com>2008-12-23 02:17:59 -0600
commitc3de65119d49c27f6bba57e04b82a768342174f7 (patch)
tree2207758ada0d23bbdd54a1c19bd6653ee2b70435
parent1791e7e3510a35b22add527125107ee221ef83e3 (diff)
Add existence checks to the boot-media scan
This prevents some cosmetic errors when globbing fails and the scripts try to mount something silly like "/dev/hd[a-z]" Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
-rw-r--r--archiso/hooks/archiso2
1 files changed, 2 insertions, 0 deletions
diff --git a/archiso/hooks/archiso b/archiso/hooks/archiso
index fdbd514..b01addb 100644
--- a/archiso/hooks/archiso
+++ b/archiso/hooks/archiso
@@ -61,6 +61,7 @@ run_hook ()
/bin/modprobe -q isofs >/dev/null 2>&1
msg ":: Scanning cd drives..."
for cdrom in /dev/hd[a-z] /dev/sr[0-9]* /dev/scd[a-z] /dev/sg[0-9]*; do
+ [ ! -e "${cdrom}" ] || continue
if mount -r -t iso9660 "${cdrom}" /bootmnt >/dev/null 2>&1; then
if [ -e "/bootmnt/isomounts" ]; then
found=1
@@ -76,6 +77,7 @@ run_hook ()
if [ ${found} -eq 0 ]; then
msg ":: Scanning usb drives..."
for usb in /dev/sd[a-z][0-9]; do
+ [ ! -e "${usb}" ] || continue
if mount -r -t vfat "${usb}" /bootmnt >/dev/null 2>&1 ||\
mount -r -t ext2 "${usb}" /bootmnt >/dev/null 2>&1; then
if [ -e "/bootmnt/isomounts" ]; then