[PATCH 2/2] defaultenv-2: automount script: run mount only when ifup succeeds

Sascha Hauer s.hauer at pengutronix.de
Wed May 23 10:15:05 EDT 2012


Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 defaultenv-2/base/init/automount |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/defaultenv-2/base/init/automount b/defaultenv-2/base/init/automount
index e029222..63099f9 100644
--- a/defaultenv-2/base/init/automount
+++ b/defaultenv-2/base/init/automount
@@ -8,20 +8,20 @@ fi
 # automount server returned from dhcp server
 
 mkdir -p /mnt/tftp-dhcp
-automount /mnt/tftp-dhcp 'ifup eth0; mount $eth0.serverip tftp /mnt/tftp-dhcp'
+automount /mnt/tftp-dhcp 'ifup eth0 && mount $eth0.serverip tftp /mnt/tftp-dhcp'
 
 # automount nfs server example
 
 #nfshost=somehost
 #mkdir -p /mnt/${nfshost}
-#automount /mnt/$nfshost "ifup eth0; mount ${nfshost}:/tftpboot nfs /mnt/${nfshost}"
+#automount /mnt/$nfshost "ifup eth0 && mount ${nfshost}:/tftpboot nfs /mnt/${nfshost}"
 
 # static tftp server example
 
 #mkdir -p /mnt/tftp
-#automount -d /mnt/tftp 'ifup eth0; mount $serverip tftp /mnt/tftp'
+#automount -d /mnt/tftp 'ifup eth0 && mount $serverip tftp /mnt/tftp'
 
 # FAT on usb disk example
 
 #mkdir -p /mnt/fat
-#automount -d /mnt/fat 'usb; mount /dev/usbdisk0.0 fat $automount_path'
+#automount -d /mnt/fat 'usb && [ -e /dev/disk0.0 ] && mount /dev/disk0.0 fat /mnt/fat'
-- 
1.7.10




More information about the barebox mailing list