tazpanel diff hardware.cgi @ rev 389
hardware.cgi: ensure that the mount point exists
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Mar 26 20:12:07 2014 +0000 (2014-03-26) |
parents | 32170f52a71c |
children | 6adca10ef270 |
line diff
1.1 --- a/hardware.cgi Sun Feb 23 10:51:56 2014 +0000 1.2 +++ b/hardware.cgi Wed Mar 26 20:12:07 2014 +0000 1.3 @@ -295,7 +295,9 @@ 1.4 mount\ *) 1.5 ro="" 1.6 [ -n "$(GET readonly)" ] && ro="-r" 1.7 - $device $ro $(GET mountpoint);; 1.8 + mntdir="$(GET mountpoint)" 1.9 + [ -d "$mntdir" ] || mkdir -p "$mntdir" 1.10 + $device $ro "$mntdir";; 1.11 umount\ *|swapon\ *|swapoff\ *) 1.12 $device ;; 1.13 esac