diff --git a/cifs-utils.changes b/cifs-utils.changes index b167879..2c59754 100644 --- a/cifs-utils.changes +++ b/cifs-utils.changes @@ -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 @@ -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 -- use _rundir macro +- use _rundir macro ------------------------------------------------------------------- Thu Mar 20 19:40:40 UTC 2014 - lmuelle@suse.com diff --git a/cifs-utils.spec b/cifs-utils.spec index a11650c..6b29fc8 100644 --- a/cifs-utils.spec +++ b/cifs-utils.spec @@ -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 diff --git a/cifs.init b/cifs.init index beac1db..b2574a1 100644 --- a/cifs.init +++ b/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 , 2002-2009 +# Lars Mueller , 2002-2014 # Bjoern Jacke 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,94 +55,35 @@ 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 " - 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 + timer=${TIMEOUT} + JOBS="none" + printdot="" + while [ "${JOBS}" ] && [ ${timer} -gt 0 ]; do + if [ -z "${printdot}" ]; then + echo -en "\nfrom /etc/fstab " + mount -at cifs >/dev/null & + PID=$! 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 - 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 + rc_status -v touch ${CIFS_STATE_FILE} ;; stop)