squid: update to 6.13
[openadk.git] / package / base-files / files / init.d / cifs
blobb3ca9c649baf1f8653485485970a1e010be6bdc5
1 #!/bin/sh
2 #INIT 60
4 case $1 in
5 autostop) ;;
6 autostart)
7 exec sh $0 start
8 ;;
9 start)
10 grep -v "^#" /etc/fstab | grep cifs >/dev/null 2>&1
11 if [ $? -eq 0 ]; then
12 grep cifs /proc/filesystems >/dev/null 2>&1
13 if [ $? -eq 0 ]; then
14 mntpoints=$(grep -v "^#" /etc/fstab| grep cifs|awk '{ print $2 }')
15 for mntpoint in $mntpoints; do
16 mkdir -p $mntpoint
17 done
18 mount -a -t cifs
19 else
20 logger -s -t cifs "No cifs support in kernel"
24 stop)
25 grep -v "^#" /etc/fstab| grep cifs >/dev/null 2>&1
26 if [ $? -eq 0 ]; then
27 umount -a -t cifs
30 restart)
31 sh $0 stop
32 sh $0 start
35 echo "Usage: $0 {start | stop | restart}"
36 exit 1
38 esac
39 exit $?