From c48696a0ebe9ffc938b84b921db90ac620339a52 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 5 Jun 2012 14:46:19 +0200 Subject: Splitting out a first bunch of functions out to /live/live/boot/. --- scripts/boot/mount-cifs.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 scripts/boot/mount-cifs.sh (limited to 'scripts/boot/mount-cifs.sh') 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} +} -- cgit v1.2.3