Bug 151173 - [PATCH] net/samba34: Fix rc script to return correct "status" exit code
Summary: [PATCH] net/samba34: Fix rc script to return correct "status" exit code
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Timur I. Bakeyev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-03 17:40 UTC by Ulrich Spörlein
Modified: 2011-01-30 11:20 UTC (History)
1 user (show)

See Also:


Attachments
samba34-3.4.8_2.patch (1.66 KB, patch)
2010-10-03 17:40 UTC, Ulrich Spörlein
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ulrich Spörlein freebsd_committer freebsd_triage 2010-10-03 17:40:01 UTC
When samba is not running, but samba_enable=YES in /etc/rc.conf, the "status"
subcommand will return with an exit value of 0 (indicating success). This
breaks scripts, that try to collect daemon status to restart stopped services.

Collect the return values of both smbd and nmbd and return with exit status of
either of them if one is failing.

Port maintainer (timur@FreeBSD.org) is cc'd.
Generated with FreeBSD Port Tools 0.99

How-To-Repeat: Stop samba, run the rc script as follows:

root@coyote:~# /usr/local/etc/rc.d/samba status ; echo $?
nmbd is not running.
smbd is not running.
0
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2010-10-03 17:40:39 UTC
Responsible Changed
From-To: freebsd-ports-bugs->timur

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer freebsd_triage 2011-01-30 11:19:45 UTC
uqs         2011-01-30 11:19:39 UTC

  FreeBSD ports repository (src committer)

  Modified files:
    net/samba34          Makefile 
    net/samba34/files    samba.in 
  Log:
  Collect the return values of both smbd and nmbd and return with exit status of
  either of them if one is failing.
  
  PR:             ports/151173
  Submitted by:   uqs
  Approved by:    maintainer timeout (3 months)
  Feature safe:   yes
  
  Revision  Changes    Path
  1.9       +1 -1      ports/net/samba34/Makefile
  1.3       +9 -2      ports/net/samba34/files/samba.in
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 3 Ulrich Spörlein freebsd_committer freebsd_triage 2011-01-30 11:20:11 UTC
State Changed
From-To: open->closed

Committed.