Re: Improve error message in rcctl(8) again

2023-07-13 Thread Anthony Coulter
> Hi Anthony. > > Thanks for the patch. > Slightly modified version but it should do the same. > Does this work for you? > > Index: rcctl.sh > === > RCS file: /cvs/src/usr.sbin/rcctl/rcctl.sh,v > retrieving revision 1.116 > diff -u

Re: Improve error message in rcctl(8) again

2023-07-13 Thread Antoine Jacoutot
On Mon, Jul 10, 2023 at 04:46:28PM -0400, Anthony Coulter wrote: > Seven years ago I tried to restart a configuration file and it didn't > work out: https://marc.info/?l=openbsd-tech=147318006722787=2 > > This morning I tried to disable a different configuration file and got > similar results.

Improve error message in rcctl(8) again

2023-07-10 Thread Anthony Coulter
Seven years ago I tried to restart a configuration file and it didn't work out: https://marc.info/?l=openbsd-tech=147318006722787=2 This morning I tried to disable a different configuration file and got similar results. Maybe my hands get too used to typing ".conf" when I am fiddling with config

Re: Improve error message in rcctl(8)

2016-09-15 Thread John Boeske
jacou...@bsdfrog.org> To: "Anthony Coulter" <b...@anthonycoulter.name> Cc: tech@openbsd.org Subject: Re: Improve error message in rcctl(8) On Tue, Sep 06, 2016 at 04:09:49PM -0400, Anthony Coulter wrote: > Regarding Jiri's suggestion: Here is a diff that makes > `rcctl ls all

Re: Improve error message in rcctl(8)

2016-09-06 Thread lists
Tue, 06 Sep 2016 22:41:53 +0200 Jeremie Courreges-Anglas > li...@wrant.com writes: > > > Tue, 6 Sep 2016 19:54:33 + Robert Peichaer > >> > Hi tech@, > >> > > >> > Daemon names historically match Antoine's alphanumeric proposal, and I > >> > think

Re: Improve error message in rcctl(8)

2016-09-06 Thread Jeremie Courreges-Anglas
li...@wrant.com writes: > Tue, 6 Sep 2016 19:54:33 + Robert Peichaer >> > Hi tech@, >> > >> > Daemon names historically match Antoine's alphanumeric proposal, and I >> > think underscore is a bit too much, if it's present use minus instead. >> > The logic behind this?

Re: Improve error message in rcctl(8)

2016-09-06 Thread Antoine Jacoutot
On Tue, Sep 06, 2016 at 04:09:49PM -0400, Anthony Coulter wrote: > Regarding Jiri's suggestion: Here is a diff that makes > `rcctl ls all' only list executable files with valid service > names. > > This diff also fixes two problems with my original submission: > 1. The use of `[' instead of `[['

Re: Improve error message in rcctl(8)

2016-09-06 Thread lists
Tue, 6 Sep 2016 19:54:33 + Robert Peichaer > > Hi tech@, > > > > Daemon names historically match Antoine's alphanumeric proposal, and I > > think underscore is a bit too much, if it's present use minus instead. > > The logic behind this? Match this to word termination

Re: Improve error message in rcctl(8)

2016-09-06 Thread Anthony Coulter
Regarding Jiri's suggestion: Here is a diff that makes `rcctl ls all' only list executable files with valid service names. This diff also fixes two problems with my original submission: 1. The use of `[' instead of `[[' causes filename expansion to take place on the right-hand side of the

Re: Improve error message in rcctl(8)

2016-09-06 Thread Robert Peichaer
> Hi tech@, > > Daemon names historically match Antoine's alphanumeric proposal, and I > think underscore is a bit too much, if it's present use minus instead. > The logic behind this? Match this to word termination symbols in ksh. > > Kind regards, > Anton $ find /usr/ports -name '*_*.rc'

Re: Improve error message in rcctl(8)

2016-09-06 Thread lists
Tue, 6 Sep 2016 21:04:55 +0200 Antoine Jacoutot > On Tue, Sep 06, 2016 at 09:01:08PM +0200, ludovic coues wrote: > > 2016-09-06 20:53 GMT+02:00 Antoine Jacoutot : > > > On Tue, Sep 06, 2016 at 12:29:58PM -0400, Anthony Coulter wrote: > > >>

Re: Improve error message in rcctl(8)

2016-09-06 Thread Jiri B
Could a change solve also this annoying situations? (saved files by editors...) # rcctl ls all | grep ^tor tor tor_2 tor_2~ j.

Re: Improve error message in rcctl(8)

2016-09-06 Thread Anthony Coulter
Antoine writes: > What about this? > + [[ "${_svc}" == +([_/+[:alnum:]]) ]] || return That doesn't fix the problem. You cannot use plus signs or slashes in a service name because the options to a service are set in rc.conf.local with the line foo_flags="" where `foo' is replaced by the

Re: Improve error message in rcctl(8)

2016-09-06 Thread Antoine Jacoutot
On Tue, Sep 06, 2016 at 09:01:08PM +0200, ludovic coues wrote: > 2016-09-06 20:53 GMT+02:00 Antoine Jacoutot : > > On Tue, Sep 06, 2016 at 12:29:58PM -0400, Anthony Coulter wrote: > >> Sometimes when I restart a service after changing its configuration file > >> I

Re: Improve error message in rcctl(8)

2016-09-06 Thread ludovic coues
2016-09-06 20:53 GMT+02:00 Antoine Jacoutot : > On Tue, Sep 06, 2016 at 12:29:58PM -0400, Anthony Coulter wrote: >> Sometimes when I restart a service after changing its configuration file >> I accidentally type: >> >> # rcctl restart smtpd.conf >> /usr/sbin/rcctl:

Re: Improve error message in rcctl(8)

2016-09-06 Thread Antoine Jacoutot
On Tue, Sep 06, 2016 at 12:29:58PM -0400, Anthony Coulter wrote: > Sometimes when I restart a service after changing its configuration file > I accidentally type: > > # rcctl restart smtpd.conf > /usr/sbin/rcctl: ${cached_svc_is_special_smtpd.conf}: bad substitution > /usr/sbin/rcctl[556]:

Improve error message in rcctl(8)

2016-09-06 Thread Anthony Coulter
Sometimes when I restart a service after changing its configuration file I accidentally type: # rcctl restart smtpd.conf /usr/sbin/rcctl: ${cached_svc_is_special_smtpd.conf}: bad substitution /usr/sbin/rcctl[556]: set: cached_svc_is_special_smtpd.conf: is not an identifier rcctl: service