diff -u samba-3.2.0/debian/samba.init samba-3.2.0/debian/samba.init --- samba-3.2.0/debian/samba.init +++ samba-3.2.0/debian/samba.init @@ -100,12 +100,16 @@ $0 start ;; status) - pidofproc -p $SMBDPID $DAEMON >/dev/null - status=$? - if [ $status -eq 0 ]; then - log_success_msg "SMBD is running" - else - log_failure_msg "SMBD is not running" + status="0" + NMBD_DISABLED=`testparm -s --parameter-name='disable netbios' 2>/dev/null` + if [ "$NMBD_DISABLED" != "Yes" ]; then + status_of_proc -p $NMBDPID /usr/sbin/nmbd nmbd || status=$? + fi + if [ "$RUN_MODE" != "inetd" ]; then + status_of_proc -p $SMBDPID /usr/sbin/smbd smbd || status=$? + fi + if [ "$NMBD_DISABLED" = "Yes" -a "$RUN_MODE" = "inetd" ]; then + status="4" fi exit $status ;; diff -u samba-3.2.0/debian/changelog samba-3.2.0/debian/changelog --- samba-3.2.0/debian/changelog +++ samba-3.2.0/debian/changelog @@ -1,3 +1,13 @@ +samba (2:3.2.0-4ubuntu2) intrepid; urgency=low + + * debian/control: Depend on lsb-base >= 3.2-14, which has the + status_of_proc() function. + * debian/samba.init: Replace the previous 'status' gathering mechanism with + the common one now provided by status_of_proc() (LP: #247087). + * debian/winbind.init: Add a pid variable and a 'status' action. + + -- Dustin Kirkland Mon, 28 Jul 2008 15:55:45 -0500 + samba (2:3.2.0-4ubuntu1) intrepid; urgency=low * Merge from debian unstable, remaining changes: diff -u samba-3.2.0/debian/control samba-3.2.0/debian/control --- samba-3.2.0/debian/control +++ samba-3.2.0/debian/control @@ -10,7 +10,7 @@ Package: samba Architecture: any -Depends: samba-common (= ${binary:Version}), logrotate, ${shlibs:Depends}, ${misc:Depends}, libpam-runtime (>= 0.76-13.1), libpam-modules, lsb-base (>= 3.0-6), procps, update-inetd, adduser +Depends: samba-common (= ${binary:Version}), logrotate, ${shlibs:Depends}, ${misc:Depends}, libpam-runtime (>= 0.76-13.1), libpam-modules, lsb-base (>= 3.2-14), procps, update-inetd, adduser Suggests: openbsd-inetd | inet-superserver, smbldap-tools Replaces: samba-common (<= 2.0.5a-2) Description: a LanManager-like file and printer server for Unix diff -u samba-3.2.0/debian/winbind.init samba-3.2.0/debian/winbind.init --- samba-3.2.0/debian/winbind.init +++ samba-3.2.0/debian/winbind.init @@ -16,6 +16,7 @@ DAEMON=/usr/sbin/winbindd PIDDIR=/var/run/samba +WINBINDPID=$PIDDIR/winbindd.pid # clear conflicting settings from the environment unset TMPDIR @@ -47,8 +48,11 @@ $0 stop && sleep 2 && $0 start ;; + status) + status_of_proc -p $WINBINDPID $DAEMON winbind && exit 0 || exit $? + *) - echo "Usage: /etc/init.d/winbind {start|stop|restart|force-reload}" + echo "Usage: /etc/init.d/winbind {start|stop|restart|force-reload|status}" exit 1 ;; esac