Mike Frysinger
f5ba232fb4
rc: fix inverted string compare logic
...
X-Gentoo-Bug: 417227
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=417227
Reported-by: sphakka <marcoep@gmail.com >
Signed-off-by: Mike Frysinger <vapier@gentoo.org >
2012-05-23 19:32:59 -04:00
Mike Frysinger
6241f17e95
rc: fix thinko in applet collapse
...
We want to lookup the service based on the applet name.
Reported-by: Christian Ruppert <idl0r@gentoo.org >
Signed-off-by: Mike Frysinger <vapier@gentoo.org >
2012-05-16 18:16:51 -04:00
Mike Frysinger
2486eb4989
rc: collapse the applet if statements into a single array walk
...
Signed-off-by: Mike Frysinger <vapier@gentoo.org >
2012-05-06 01:17:30 -04:00
Christian Ruppert
fd6bbfbe07
Disable some questionable lines
...
Caused by bug 412589 I was looking at the do_mark_service() function and quickly
found that the segfault is caused by a strlen() call against a NULL pointer.
I also noticed it's using "/exclusive/%s.%s" so svcname.pid, all other functions
are just using the svcname.. So it seems that svcname.pid was/is never used and
thus not necessary at all.
In relation to the above, the if statement in the do_mark_service() function
("if (ok && svcname && strcmp(svcname, service) == 0) {") needs to be
fixed/improved as svcname and service are almost always equal, see my comment in
the function for further details.
Signed-off-by: Christian Ruppert <idl0r@gentoo.org >
Reported-by: Patrick McLean <chutzpah@gentoo.org >
X-Gentoo-Bug: 412589
X-Gentoo-Bug-URL: https://bugs.gentoo.org/412589
2012-04-26 10:33:54 +02:00
Christian Ruppert
1f5072421e
Remove duplicate getenv("RC_SVCNAME") call
2012-04-24 03:49:04 +02:00
Mike Frysinger
d0bc4f20ad
drop useless "All rights reserved" notice
...
Signed-off-by: Mike Frysinger <vapier@gentoo.org >
2011-06-29 19:46:31 -04:00
William Hubbs
b512d0db98
new implementation of applet option
...
This reworks the implementation of the --applet option so that it is
processed in run_applets() and does not require two calls to the
getopts_long() function. It is based on code by Robin Johnson and Chris
Richards.
X-Gentoo-Bug: 351712
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=351712
2011-02-16 09:00:38 -06:00
Mike Frysinger
faa2df1159
more whitespace cleanup
...
Signed-off-by: Mike Frysinger <vapier@gentoo.org >
2011-01-17 04:49:12 -05:00
Robin H. Johnson
e6fc30da61
Clean up all trailing whitespace in src/.
2011-01-17 08:28:43 +00:00
Mike Frysinger
ecf9ef49a7
random spelling fixes
...
Signed-off-by: Mike Frysinger <vapier@gentoo.org >
2010-01-08 22:02:51 +00:00
Roy Marples
a8f6a9b654
Add new utility and init script swclock that sets the system time based on
...
the mtime of a file. It saves the shutdown time to this file also.
This is handy for systems without a working RTC chip.
Based on an idea by Michael A. Smith <michael@smith-li.com >.
Fixes Gentoo #272073 .
2009-10-13 08:03:45 +01:00
Roy Marples
658a220638
Add (c) to Copyright
2009-05-01 15:11:40 +01:00
Roy Marples
ade85d4bd8
Improve style for KNF
2009-04-23 21:31:22 +00:00
Roy Marples
c9e24a0494
Move status to runscript.sh so init scripts can override it, #159
...
Return 32 if crashed, #163
2009-04-18 00:09:03 +00:00
Roy Marples
3d37005a3d
We now warn about clock skews
...
rc-update -u will force a regen of the dep tree
rc_newer_than and rc_olderthan now take another two parameters for newest/oldest file and mtime
2009-01-12 23:53:13 +00:00
Roy Marples
50b8aba8d9
Remove coldplug and just have hotplug which is a list of allowed/disallowed services. Makes things much easier.
2008-10-10 09:08:59 +00:00
Roy Marples
8c8751fa60
Clean up warnings regarding printf.
2008-10-08 15:56:47 +00:00
Roy Marples
80a17eb596
Clean up some compile warnings.
2008-09-18 13:09:51 +00:00
Roy Marples
cea206014d
Attempt to make s-s-d simpler by not enforcing the need for a full path and maybe working better with interpreted scripts.
2008-07-27 11:30:49 +00:00
Roy Marples
157db50df7
Fix is_older_than a little better, and make is_newer_than correct.
2008-07-03 13:30:17 +00:00
Roy Marples
a88a177f99
Add older_than function to complement newer_than function. Also make the userland instance reversed to be compatable with current baselayout, which truely does suck.
2008-07-03 13:11:47 +00:00
Roy Marples
ba8008fb05
Include time headers for ewaitfile.
2008-06-04 14:09:25 +00:00
Roy Marples
587051ec67
Add the ewaitfile function so init scripts can wait until sockts are created, Gentoo #175783 .
2008-06-03 11:57:15 +00:00
Roy Marples
f0aacec02e
Cast to unsigned char for ctype calls.
2008-04-17 10:19:58 +00:00
Roy Marples
5d38d4d6e9
p could be null here.
2008-04-06 13:21:42 +00:00
Roy Marples
15d34d0a16
Add license blurb to a few files and append my email to my name.
2008-03-26 17:53:37 +00:00
Roy Marples
068c90c82b
Fix exclusive removal.
2008-03-25 18:20:23 +00:00
Roy Marples
494fb0a5f6
Add --list to rc-service to list all available services.
2008-03-21 09:10:59 +00:00
Roy Marples
ec2d39d024
Just warn about the incorrect service. Let the right service be more explanitory about missing options.
2008-03-19 22:26:45 +00:00
Roy Marples
d948e65d60
Give a better error message when no service specified.
2008-03-19 20:04:48 +00:00
Roy Marples
97abd91577
Report wrong service correctly.
2008-03-19 20:01:48 +00:00
Roy Marples
6159a32f39
SVCNAME -> RC_SVCNAME, but export SVCNAME still for compat.
2008-03-19 19:57:24 +00:00
Roy Marples
d9ec62b22a
Add rc-service and update all softlevel refs to runlevel.
2008-03-19 17:11:50 +00:00
Roy Marples
cb9da6a262
Remove null terminated char ** lists in favour of RC_STRINGLIST, using TAILQ from queue(3). Refactor code style around the BSD KNF.
2008-03-16 17:00:56 +00:00
Roy Marples
8b4b958678
Now that s-s-d accepts >1 argument for stopping a daemon on match we need to store all arguments used incase a service started the same daemon more than once with different paramters.
2008-02-23 00:26:11 +00:00
Roy Marples
9ce3086bf5
Fix service_started_daemon, bug #11
2008-01-28 13:16:33 +00:00
Roy Marples
649a710552
Quiet some more lint warnings.
2008-01-22 11:07:39 +00:00
Roy Marples
07728abbc1
Checking first char for null is more efficient than strlen.
2008-01-21 15:30:40 +00:00
Roy Marples
28618c8174
should not produce a red star
2008-01-21 14:31:21 +00:00
Roy Marples
46294cba02
Fix shell_var as reported by lamusic.
2008-01-14 16:17:03 +00:00
Roy Marples
62d793f7ff
Fix is_older_than.
2008-01-14 14:41:02 +00:00
Roy Marples
e068757810
Put the applets into rc-applet.c so that rc.c is easier to manage.
2008-01-14 14:24:20 +00:00