Accepting request 257815 from network:samba:STABLE
Automatic submission by obs-autosubmit OBS-URL: https://build.opensuse.org/request/show/257815 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cifs-utils?expand=0&rev=43
This commit is contained in:
commit
04864769bd
@ -1,3 +1,13 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 13 22:01:06 UTC 2014 - lmuelle@suse.com
|
||||
|
||||
- Fix broken rccifs symbolic link.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 13 13:42:09 UTC 2014 - lmuelle@suse.com
|
||||
|
||||
- Remove dead code associated with cifstab file which is no longer used.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Aug 31 19:15:08 UTC 2014 - ddiss@suse.com
|
||||
|
||||
|
@ -141,7 +141,7 @@ mkdir -p \
|
||||
${RPM_BUILD_ROOT}/%{_sbindir} \
|
||||
${RPM_BUILD_ROOT}/%{_rundir}
|
||||
install -m 0755 -p ${RPM_SOURCE_DIR}/cifs.init ${RPM_BUILD_ROOT}/%{_sysconfdir}/init.d/cifs
|
||||
ln -s %{_sysconfdir}/init.d/${cifs_init_script} ${RPM_BUILD_ROOT}/%{_sbindir}/rccifs
|
||||
ln -s %{_sysconfdir}/init.d/cifs ${RPM_BUILD_ROOT}/%{_sbindir}/rccifs
|
||||
touch ${RPM_BUILD_ROOT}/%{_sysconfdir}/sysconfig/%{NET_CFGDIR}/if-{down,up}.d/${script} \
|
||||
${RPM_BUILD_ROOT}%{_rundir}/cifs
|
||||
%endif
|
||||
|
82
cifs.init
82
cifs.init
@ -1,9 +1,9 @@
|
||||
#! /bin/sh
|
||||
# Copyright (c) 1999-2009 SuSE Linux AG, Nuernberg, Germany.
|
||||
# Copyright (c) 1999-2014 SUSE Linux Products GmbH, Nuernberg, Germany.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Author: Thomas Fehr, 1999-2001
|
||||
# Lars Mueller <lmuelle@suse.de>, 2002-2009
|
||||
# Lars Mueller <lmuelle@suse.com>, 2002-2014
|
||||
# Bjoern Jacke <bjacke@SerNet.de> 2004
|
||||
#
|
||||
# /etc/init.d/cifs
|
||||
@ -31,21 +31,20 @@
|
||||
# Should-Stop: nfs nmb
|
||||
# Default-Start: 3 5
|
||||
# Default-Stop: 0 1 2 6
|
||||
# Short-Description: Import remote SMB/ CIFS (MS Windows) file systems
|
||||
# Description: Import remote SMB/ CIFS (MS Windows) file systems
|
||||
# Short-Description: Import remote CIFS file systems
|
||||
# Description: Import remote CIFS file systems
|
||||
### END INIT INFO
|
||||
|
||||
# To access SMB/ CIFS servers beyond the network broadcast domain it may be
|
||||
# necessary to also activate the nmb service. Also see section 'cifs and nmb
|
||||
# service' in /usr/share/doc/packages/samba/README.SUSE
|
||||
# To access CIFS servers beyond the network broadcast domain it may be
|
||||
# necessary to also activate the nmb service. Also see section 'cifs
|
||||
# and nmb service' in /usr/share/doc/packages/samba/README.SUSE
|
||||
|
||||
. /etc/rc.status
|
||||
rc_reset
|
||||
|
||||
LC_ALL=en_US
|
||||
CIFSTAB="/etc/samba/cifstab"
|
||||
SMB_CONF="/etc/samba/smb.conf"
|
||||
CIFS_STATE_FILE="/var/run/cifs"
|
||||
CIFS_STATE_FILE="/run/cifs.state"
|
||||
SLEEP=1
|
||||
TIMEOUT=10
|
||||
|
||||
@ -56,22 +55,18 @@ case "$1" in
|
||||
start)
|
||||
grep -q '^[[:space:]]*[^#].*[[:space:]]cifs[[:space:]]' /etc/fstab
|
||||
rc=$?
|
||||
if [ ! -f ${CIFSTAB} -a ${rc} -ne 0 ]; then
|
||||
echo -n >&2 "No ${CIFSTAB} found and no type cifs active in /etc/fstab. "
|
||||
if [ ${rc} -ne 0 ]; then
|
||||
echo -n >&2 "No filesystem of type cifs active in /etc/fstab. "
|
||||
rc_status -s
|
||||
exit 6
|
||||
fi
|
||||
echo -n "Mount CIFS File Systems "
|
||||
service_used="no"
|
||||
if [ ${rc} -eq 0 ]; then
|
||||
service_used="yes"
|
||||
timer=${TIMEOUT}
|
||||
JOBS="none"
|
||||
printdot=""
|
||||
while [ "${JOBS}" ] && [ ${timer} -gt 0 ]; do
|
||||
if [ -z "${printdot}" ]; then
|
||||
echo
|
||||
echo -n "from /etc/fstab "
|
||||
echo -en "\nfrom /etc/fstab "
|
||||
mount -at cifs >/dev/null &
|
||||
PID=$!
|
||||
fi
|
||||
@ -89,61 +84,6 @@ case "$1" in
|
||||
rc_failed
|
||||
fi
|
||||
rc_status -v
|
||||
fi
|
||||
timer=-1
|
||||
test -e ${CIFSTAB} && \
|
||||
while read service mountpoint vfstype options; do
|
||||
case "${service}" in
|
||||
""|\#*|\;*) continue ;;
|
||||
esac
|
||||
# Set default vfstype which is also a hack for old
|
||||
# cifstab formated files without a vfstype set.
|
||||
if [ "${vfstype}" != "cifs" -a -z "${options}" ]; then
|
||||
options="${vfstype}"
|
||||
vfstype="cifs"
|
||||
fi
|
||||
# If no options are set use an empty password.
|
||||
if [ -z "${options}" ]; then
|
||||
options="password="
|
||||
fi
|
||||
if [ ${timer} -eq -1 ]; then
|
||||
echo -en "from ${CIFSTAB} \n"
|
||||
timer=0
|
||||
fi
|
||||
# Remove /s at the end of a mount point.
|
||||
mountpoint=$( echo "$mountpoint"|sed "s/\/*$//")
|
||||
if grep -q "[[:space:]]$mountpoint[[:space:]]" /proc/mounts; then
|
||||
echo -n "$mountpoint: mount point already in use. "
|
||||
rc_status -s
|
||||
continue
|
||||
fi
|
||||
service_used="yes"
|
||||
echo -n "${service} on ${mountpoint} type ${vfstype} "
|
||||
rc_reset
|
||||
timer=${TIMEOUT}
|
||||
JOBS="none"
|
||||
printdot=""
|
||||
while [ "${JOBS}" ] && [ ${timer} -gt 0 ]; do
|
||||
if [ -z "${printdot}" ]; then
|
||||
mount -t "${vfstype}" -o ${options} "${service}" "${mountpoint}" >/dev/null &
|
||||
PID=$!
|
||||
fi
|
||||
test -e /proc/$PID || JOBS=""
|
||||
if [ "${JOBS}" ]; then
|
||||
timer=$[${timer}-1]
|
||||
echo -n "."
|
||||
sleep ${SLEEP}
|
||||
printdot="yes"
|
||||
fi
|
||||
done
|
||||
test "${printdot}" && echo -n " "
|
||||
if [ "${JOBS}" -a ${timer} -eq 0 ]; then
|
||||
echo -n >&2 " Error: timeout while mount. "
|
||||
rc_failed
|
||||
fi
|
||||
rc_status -v
|
||||
done < ${CIFSTAB}
|
||||
test "${service_used}" = "no" && rc_status -u
|
||||
touch ${CIFS_STATE_FILE}
|
||||
;;
|
||||
stop)
|
||||
|
Loading…
Reference in New Issue
Block a user