summaryrefslogtreecommitdiff
path: root/package/base-files
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2015-06-07 11:14:26 -0500
committerWaldemar Brodkorb <wbx@openadk.org>2015-06-13 14:50:46 -0500
commit6aa176208434284dd448d69f40310cf4918932d8 (patch)
tree2371228f4b13b1fec7ca99a65497eb312d2a1604 /package/base-files
parent35d138ab9ed3211018ccf15a64d96934d504cffb (diff)
create mountpoints for cifs, when /media used
Diffstat (limited to 'package/base-files')
-rw-r--r--package/base-files/src/etc/init.d/cifs14
1 files changed, 9 insertions, 5 deletions
diff --git a/package/base-files/src/etc/init.d/cifs b/package/base-files/src/etc/init.d/cifs
index 5de597b40..b3ca9c649 100644
--- a/package/base-files/src/etc/init.d/cifs
+++ b/package/base-files/src/etc/init.d/cifs
@@ -7,19 +7,23 @@ autostart)
exec sh $0 start
;;
start)
- grep -v "^#" /etc/fstab| grep cifs >/dev/null 2>&1
- if [ $? -eq 0 ];then
+ grep -v "^#" /etc/fstab | grep cifs >/dev/null 2>&1
+ if [ $? -eq 0 ]; then
grep cifs /proc/filesystems >/dev/null 2>&1
- if [ $? -eq 0 ];then
+ if [ $? -eq 0 ]; then
+ mntpoints=$(grep -v "^#" /etc/fstab| grep cifs|awk '{ print $2 }')
+ for mntpoint in $mntpoints; do
+ mkdir -p $mntpoint
+ done
mount -a -t cifs
else
- logger -t cifs "No cifs support in kernel"
+ logger -s -t cifs "No cifs support in kernel"
fi
fi
;;
stop)
grep -v "^#" /etc/fstab| grep cifs >/dev/null 2>&1
- if [ $? -eq 0 ];then
+ if [ $? -eq 0 ]; then
umount -a -t cifs
fi
;;