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
|
Sun Aug 31 19:15:08 UTC 2014 - ddiss@suse.com
|
||||||
|
|
||||||
@ -28,7 +38,7 @@ Wed Jun 18 19:49:50 UTC 2014 - lmuelle@suse.com
|
|||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu May 8 11:45:19 CEST 2014 - ro@suse.de
|
Thu May 8 11:45:19 CEST 2014 - ro@suse.de
|
||||||
|
|
||||||
- use _rundir macro
|
- use _rundir macro
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Mar 20 19:40:40 UTC 2014 - lmuelle@suse.com
|
Thu Mar 20 19:40:40 UTC 2014 - lmuelle@suse.com
|
||||||
|
@ -141,7 +141,7 @@ mkdir -p \
|
|||||||
${RPM_BUILD_ROOT}/%{_sbindir} \
|
${RPM_BUILD_ROOT}/%{_sbindir} \
|
||||||
${RPM_BUILD_ROOT}/%{_rundir}
|
${RPM_BUILD_ROOT}/%{_rundir}
|
||||||
install -m 0755 -p ${RPM_SOURCE_DIR}/cifs.init ${RPM_BUILD_ROOT}/%{_sysconfdir}/init.d/cifs
|
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} \
|
touch ${RPM_BUILD_ROOT}/%{_sysconfdir}/sysconfig/%{NET_CFGDIR}/if-{down,up}.d/${script} \
|
||||||
${RPM_BUILD_ROOT}%{_rundir}/cifs
|
${RPM_BUILD_ROOT}%{_rundir}/cifs
|
||||||
%endif
|
%endif
|
||||||
|
122
cifs.init
122
cifs.init
@ -1,9 +1,9 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Copyright (c) 1999-2009 SuSE Linux AG, Nuernberg, Germany.
|
# Copyright (c) 1999-2014 SUSE Linux Products GmbH, Nuernberg, Germany.
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
# Author: Thomas Fehr, 1999-2001
|
# 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
|
# Bjoern Jacke <bjacke@SerNet.de> 2004
|
||||||
#
|
#
|
||||||
# /etc/init.d/cifs
|
# /etc/init.d/cifs
|
||||||
@ -31,21 +31,20 @@
|
|||||||
# Should-Stop: nfs nmb
|
# Should-Stop: nfs nmb
|
||||||
# Default-Start: 3 5
|
# Default-Start: 3 5
|
||||||
# Default-Stop: 0 1 2 6
|
# Default-Stop: 0 1 2 6
|
||||||
# Short-Description: Import remote SMB/ CIFS (MS Windows) file systems
|
# Short-Description: Import remote CIFS file systems
|
||||||
# Description: Import remote SMB/ CIFS (MS Windows) file systems
|
# Description: Import remote CIFS file systems
|
||||||
### END INIT INFO
|
### END INIT INFO
|
||||||
|
|
||||||
# To access SMB/ CIFS servers beyond the network broadcast domain it may be
|
# 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
|
# necessary to also activate the nmb service. Also see section 'cifs
|
||||||
# service' in /usr/share/doc/packages/samba/README.SUSE
|
# and nmb service' in /usr/share/doc/packages/samba/README.SUSE
|
||||||
|
|
||||||
. /etc/rc.status
|
. /etc/rc.status
|
||||||
rc_reset
|
rc_reset
|
||||||
|
|
||||||
LC_ALL=en_US
|
LC_ALL=en_US
|
||||||
CIFSTAB="/etc/samba/cifstab"
|
|
||||||
SMB_CONF="/etc/samba/smb.conf"
|
SMB_CONF="/etc/samba/smb.conf"
|
||||||
CIFS_STATE_FILE="/var/run/cifs"
|
CIFS_STATE_FILE="/run/cifs.state"
|
||||||
SLEEP=1
|
SLEEP=1
|
||||||
TIMEOUT=10
|
TIMEOUT=10
|
||||||
|
|
||||||
@ -56,94 +55,35 @@ case "$1" in
|
|||||||
start)
|
start)
|
||||||
grep -q '^[[:space:]]*[^#].*[[:space:]]cifs[[:space:]]' /etc/fstab
|
grep -q '^[[:space:]]*[^#].*[[:space:]]cifs[[:space:]]' /etc/fstab
|
||||||
rc=$?
|
rc=$?
|
||||||
if [ ! -f ${CIFSTAB} -a ${rc} -ne 0 ]; then
|
if [ ${rc} -ne 0 ]; then
|
||||||
echo -n >&2 "No ${CIFSTAB} found and no type cifs active in /etc/fstab. "
|
echo -n >&2 "No filesystem of type cifs active in /etc/fstab. "
|
||||||
rc_status -s
|
rc_status -s
|
||||||
exit 6
|
exit 6
|
||||||
fi
|
fi
|
||||||
echo -n "Mount CIFS File Systems "
|
echo -n "Mount CIFS File Systems "
|
||||||
service_used="no"
|
timer=${TIMEOUT}
|
||||||
if [ ${rc} -eq 0 ]; then
|
JOBS="none"
|
||||||
service_used="yes"
|
printdot=""
|
||||||
timer=${TIMEOUT}
|
while [ "${JOBS}" ] && [ ${timer} -gt 0 ]; do
|
||||||
JOBS="none"
|
if [ -z "${printdot}" ]; then
|
||||||
printdot=""
|
echo -en "\nfrom /etc/fstab "
|
||||||
while [ "${JOBS}" ] && [ ${timer} -gt 0 ]; do
|
mount -at cifs >/dev/null &
|
||||||
if [ -z "${printdot}" ]; then
|
PID=$!
|
||||||
echo
|
|
||||||
echo -n "from /etc/fstab "
|
|
||||||
mount -at cifs >/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
|
fi
|
||||||
rc_status -v
|
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
|
fi
|
||||||
timer=-1
|
rc_status -v
|
||||||
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}
|
touch ${CIFS_STATE_FILE}
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
|
Loading…
Reference in New Issue
Block a user