summaryrefslogtreecommitdiff
path: root/package/base-files
diff options
context:
space:
mode:
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
;;