CVS log for src/usr.sbin/service/service
Up to [cvs.NetBSD.org] / src / usr.sbin / service
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
Revision 1.10: download - view: text, markup, annotated - select for diffs
Fri Jul 26 18:54:49 2024 UTC (5 months, 3 weeks ago) by jakllsch
Branches: MAIN
CVS tags: HEAD
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +2 -2
lines
Fix missing whitespace in not found message.
From Daniel Cunha in PR 58471
Revision 1.9: download - view: text, markup, annotated - select for diffs
Tue Mar 14 06:19:35 2023 UTC (22 months ago) by kre
Branches: MAIN
CVS tags: perseant-exfatfs-base-20240630,
perseant-exfatfs-base,
perseant-exfatfs
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +153 -62
lines
Don't inappropriately use xargs to run rcorder -- xargs is designed
to run the given command as many times as necessary, but rcorder must
be run just once, with all the rc.d scripts as args. If that turns out
to be too many (E2BIG on exec) then we have more serious problems, working
around it by use of xargs just makes a mess (for rcorder).
Make the -e option cause the script to exit 0 if some enabled script was
found, and 1 if not, so one can do:
if service -e foobar >/dev/null
then
whatever we want to do when foobar is enabled
else
anything we want instead if it is not
fi
Someday perhaps add a -q to suppress the output instead of requiring
the redirect, but that day is not this one. Make all error exit status
codes be >1 (and use the standard 126 instead of 255, for "exec failed").
Note that with more than one service given with -e, or when none are (so
all enabled scripts are listed) the exit status is 0 if any enabled script
was found (ie: anything was printed to stdout), not if all named scripts
exist and are enabled. Testing the status works best with just one
script name given as an arg.
Correctly quote script names (and use eval where required) so scripts
(or paths to scripts) containing spaces, tabs, or shell operator chars
might be handled correctly (newlines in names will still cause failures.)
Treat rc.d scripts that do not have an rcvar (hence are always enabled)
as enabled scripts, rather than disabled - but ignore the LOGIN DAEMON...
pseudo-scripts.
While here, replace archaic uses of "test" ('[') (that is, -a etc) with
standard defined usages only, replace a baroque use of sed with sh code
(which is simpler and much faster, not that speed matters) - but do use sed
instead of two grep invocations. Replace all uses of "echo" with "printf"
(just "because"!) Make the usage more useful (explain what the various
option combinations achieve, explicitly), and also while here, make the
formatting look closer to something I can deal with (personally I prefer
tab indents almost everywhere, but 4 space is OK...) Aligned runs of 8
spaces were all replaced by a tab. For the options, use sh boolean cmds
(true|false), and simply run them, rather than making them be empty or set
and using test -n, it is easier to follow (and a tiny fraction of a ns faster).
Change a comment so what it says is relevant to the code that is present,
rather than to the change (referring to code that used to be present) with
which it was added.
Catch the manual page up with the minor parts of this intended to be
visible to users (like the exit status change).
Revision 1.7.2.3: download - view: text, markup, annotated - select for diffs
Sat Jul 8 16:06:00 2017 UTC (7 years, 6 months ago) by snj
Branches: netbsd-7
CVS tags: netbsd-7-2-RELEASE
Diff to: previous 1.7.2.2: preferred, colored; branchpoint 1.7: preferred, colored; next MAIN 1.8: preferred, colored
Changes since revision 1.7.2.2: +3 -3
lines
Pull up following revision(s) (requested by sborrill in ticket #1427):
usr.sbin/service/service: revision 1.8
Only match first instance of name and rcvar in file.
Revision 1.7.10.1: download - view: text, markup, annotated - select for diffs
Tue Jun 6 09:20:14 2017 UTC (7 years, 7 months ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-3-RELEASE,
netbsd-8-2-RELEASE,
netbsd-8-1-RELEASE,
netbsd-8-1-RC1,
netbsd-8-0-RELEASE,
netbsd-8-0-RC2,
netbsd-8-0-RC1,
matt-nb8-mediatek-base,
matt-nb8-mediatek
Diff to: previous 1.7: preferred, colored; next MAIN 1.8: preferred, colored
Changes since revision 1.7: +3 -3
lines
Pull up following revision(s) (requested by sborrill in ticket #9):
usr.sbin/service/service: revision 1.8
Only match first instance of name and rcvar in file.
Revision 1.8: download - view: text, markup, annotated - select for diffs
Mon Jun 5 09:20:05 2017 UTC (7 years, 7 months ago) by sborrill
Branches: MAIN
CVS tags: phil-wifi-base,
phil-wifi-20200421,
phil-wifi-20200411,
phil-wifi-20200406,
phil-wifi-20191119,
phil-wifi-20190609,
phil-wifi,
pgoyette-compat-merge-20190127,
pgoyette-compat-base,
pgoyette-compat-20190127,
pgoyette-compat-20190118,
pgoyette-compat-1226,
pgoyette-compat-1126,
pgoyette-compat-1020,
pgoyette-compat-0930,
pgoyette-compat-0906,
pgoyette-compat-0728,
pgoyette-compat-0625,
pgoyette-compat-0521,
pgoyette-compat-0502,
pgoyette-compat-0422,
pgoyette-compat-0415,
pgoyette-compat-0407,
pgoyette-compat-0330,
pgoyette-compat-0322,
pgoyette-compat-0315,
pgoyette-compat,
perseant-stdc-iso10646-base,
perseant-stdc-iso10646,
netbsd-9-base,
netbsd-9-4-RELEASE,
netbsd-9-3-RELEASE,
netbsd-9-2-RELEASE,
netbsd-9-1-RELEASE,
netbsd-9-0-RELEASE,
netbsd-9-0-RC2,
netbsd-9-0-RC1,
netbsd-9,
netbsd-10-base,
netbsd-10-1-RELEASE,
netbsd-10-0-RELEASE,
netbsd-10-0-RC6,
netbsd-10-0-RC5,
netbsd-10-0-RC4,
netbsd-10-0-RC3,
netbsd-10-0-RC2,
netbsd-10-0-RC1,
netbsd-10,
is-mlppp-base,
is-mlppp,
cjep_sun2x-base1,
cjep_sun2x-base,
cjep_sun2x,
cjep_staticlib_x-base1,
cjep_staticlib_x-base,
cjep_staticlib_x
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +3 -3
lines
Only match first instance of name and rcvar in file.
Revision 1.7.2.2: download - view: text, markup, annotated - select for diffs
Tue Apr 21 05:22:58 2015 UTC (9 years, 9 months ago) by snj
Branches: netbsd-7
CVS tags: netbsd-7-nhusb-base-20170116,
netbsd-7-nhusb-base,
netbsd-7-nhusb,
netbsd-7-1-RELEASE,
netbsd-7-1-RC2,
netbsd-7-1-RC1,
netbsd-7-1-2-RELEASE,
netbsd-7-1-1-RELEASE,
netbsd-7-1,
netbsd-7-0-RELEASE,
netbsd-7-0-RC3,
netbsd-7-0-RC2,
netbsd-7-0-RC1,
netbsd-7-0-2-RELEASE,
netbsd-7-0-1-RELEASE,
netbsd-7-0
Diff to: previous 1.7.2.1: preferred, colored; branchpoint 1.7: preferred, colored
Changes since revision 1.7.2.1: +126 -0
lines
Pull up following revision(s) (requested by ast in ticket #636):
distrib/sets/lists/base/mi: revision 1.1098
distrib/sets/lists/man/mi: revision 1.1498
doc/CHANGES: patch
usr.sbin/Makefile: revision 1.270
usr.sbin/service/Makefile: revision 1.1
usr.sbin/service/service: revision 1.1-1.7
usr.sbin/service/service.8: revisions 1.1-1.4
Import a substantially modified service(8) command from FreeBSD to
manage rc.d scripts. This command is well known on most other Unixes
and should help soften the learning curve for Unix admins coming
to NetBSD.
--
Make the usage appear more standard.
--
Sort options. Use An -nosplit in AUTHORS section.
--
Remove -f option as rc_fast is not set in invocation mode.
Do the load_rc_config *after* option parsing.
Catch conflicting -e + -l option specs.
--
Integrate some feedback gleened from tech-userlevel@netbsd.org
Avoid ls -P so that script can also run pre-netbsd-7.
Make sure /etc/rc.conf.d configurations are supported.
--
cosmetic change in man 8 service
use shell quoting in a safe way as suggested by Alan Barrett
--
More shell quoting. /etc/rc.d/* file names with embedded spaces are
not expected to work, but let's quote them anyway.
Revision 1.7.2.1
Sun Apr 5 11:33:15 2015 UTC (9 years, 9 months ago) by snj
Branches: netbsd-7
FILE REMOVED
Changes since revision 1.7: +0 -126
lines
file service was added on branch netbsd-7 on 2015-04-21 05:22:58 +0000
Revision 1.7: download - view: text, markup, annotated - select for diffs
Sun Apr 5 11:33:15 2015 UTC (9 years, 9 months ago) by apb
Branches: MAIN
CVS tags: prg-localcount2-base3,
prg-localcount2-base2,
prg-localcount2-base1,
prg-localcount2-base,
prg-localcount2,
pgoyette-localcount-base,
pgoyette-localcount-20170426,
pgoyette-localcount-20170320,
pgoyette-localcount-20170107,
pgoyette-localcount-20161104,
pgoyette-localcount-20160806,
pgoyette-localcount-20160726,
pgoyette-localcount,
netbsd-8-base,
localcount-20160914,
bouyer-socketcan-base1,
bouyer-socketcan-base,
bouyer-socketcan
Branch point for: netbsd-8,
netbsd-7
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +7 -7
lines
More shell quoting. /etc/rc.d/* file names with embedded spaces are
not expected to work, but let's quote them anyway.
Revision 1.6: download - view: text, markup, annotated - select for diffs
Thu Apr 2 18:41:22 2015 UTC (9 years, 9 months ago) by ast
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +6 -4
lines
cosmetic change in man 8 service
use shell quoting in a safe way as suggested by Alan Barrett
Revision 1.5: download - view: text, markup, annotated - select for diffs
Fri Mar 27 23:25:42 2015 UTC (9 years, 9 months ago) by ast
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +15 -8
lines
Integrate some feedback gleened from tech-userlevel@netbsd.org:
Avoid ls -P so that script can also run pre-netbsd-7.
Make sure /etc/rc.conf.d configurations are supported.
Revision 1.4: download - view: text, markup, annotated - select for diffs
Mon Mar 23 23:28:55 2015 UTC (9 years, 9 months ago) by ast
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +12 -13
lines
Remove -f option as rc_fast is not set in invocation mode.
Do the load_rc_config *after* option parsing.
Catch conflicting -e + -l option specs.
Revision 1.3: download - view: text, markup, annotated - select for diffs
Sun Mar 22 22:39:05 2015 UTC (9 years, 9 months ago) by wiz
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +5 -5
lines
Sort options in usage.
Revision 1.2: download - view: text, markup, annotated - select for diffs
Sun Mar 22 10:24:48 2015 UTC (9 years, 10 months ago) by ast
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +4 -4
lines
Make the usage appear more standard.
Revision 1.1: download - view: text, markup, annotated - select for diffs
Sun Mar 22 09:57:42 2015 UTC (9 years, 10 months ago) by ast
Branches: MAIN
Import a substantially modified service(8) command from FreeBSD to
manage rc.d scripts. This command is well known on most other Unixes
and should help soften the learning curve for Unix admins coming
to NetBSD.
CVSweb <webmaster@jp.NetBSD.org>