diff options
author | Daniel Baumann <daniel@debian.org> | 2012-06-05 14:46:19 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2012-06-05 16:11:16 +0200 |
commit | c48696a0ebe9ffc938b84b921db90ac620339a52 (patch) | |
tree | 6ac85d6265f3217158ab0ac71981f1fa94af1eaa /scripts/boot/mount-cifs.sh | |
parent | fea4312679b6d371123296d1a5d9987419888487 (diff) | |
download | live-boot-c48696a0ebe9ffc938b84b921db90ac620339a52.tar.gz live-boot-c48696a0ebe9ffc938b84b921db90ac620339a52.zip |
Splitting out a first bunch of functions out to /live/live/boot/.
Diffstat (limited to 'scripts/boot/mount-cifs.sh')
-rwxr-xr-x | scripts/boot/mount-cifs.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/scripts/boot/mount-cifs.sh b/scripts/boot/mount-cifs.sh new file mode 100755 index 0000000..24fef88 --- /dev/null +++ b/scripts/boot/mount-cifs.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +do_cifsmount () +{ + rc=1 + + if [ -x "/sbin/mount.cifs" ] + then + if [ -z "${NFSOPTS}" ] + then + CIFSOPTS="-ouser=root,password=" + else + CIFSOPTS="-o ${NFSOPTS}" + fi + + log_begin_msg "Trying mount.cifs ${NFSROOT} ${mountpoint} ${CIFSOPTS}" + modprobe -q cifs + + if mount.cifs "${NFSROOT}" "${mountpoint}" "${CIFSOPTS}" + then + rc=0 + fi + fi + + return ${rc} +} |