/[baselayout]/branches/baselayout-1_12/sbin/runscript.sh
Gentoo

Contents of /branches/baselayout-1_12/sbin/runscript.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2141 - (show annotations) (download) (as text)
Sun Jul 9 13:21:53 2006 UTC (11 years, 10 months ago) by uberlord
File MIME type: text/x-sh
File size: 18228 byte(s)
Stop inactive dependencies too
1 #!/bin/bash
2 # Copyright 1999-2006 Gentoo Foundation
3 # Distributed under the terms of the GNU General Public License v2
4
5 # Common functions
6 [[ ${RC_GOT_FUNCTIONS} != "yes" ]] && source /sbin/functions.sh
7
8 # User must be root to run most script stuff (except status)
9 if [[ ${EUID} != "0" ]] && ! [[ $2 == "status" && $# -eq 2 ]] ; then
10 eerror "$0: must be root to run init scripts"
11 exit 1
12 fi
13
14 myscript="$1"
15 if [[ -L $1 && ! -L "/etc/init.d/${1##*/}" ]] ; then
16 SVCNAME="$(readlink "$1")"
17 else
18 SVCNAME="$1"
19 fi
20
21 declare -r SVCNAME="${SVCNAME##*/}"
22 export SVCNAME
23 # Support deprecated myservice variable
24 myservice="${SVCNAME}"
25
26 svc_trap() {
27 trap 'eerror "ERROR: ${SVCNAME} caught an interrupt"; exit 1' \
28 INT QUIT TSTP
29 }
30
31 # Setup a default trap
32 svc_trap
33
34 # coldplug events can trigger init scripts, but we don't want to run them
35 # until after rc sysinit has completed so we punt them to the boot runlevel
36 if [[ -e /dev/.rcsysinit ]] ; then
37 eerror "ERROR: cannot run ${SVCNAME} until sysinit completes"
38 [[ ${RC_COLDPLUG:-yes} != "yes" ]] && exit 1
39 set -f
40 for x in ${RC_PLUG_SERVICES} ; do
41 [[ ${SVCNAME} == ${x} ]] && break
42 [[ "!${SVCNAME}" == ${x} ]] && exit 1
43 done
44 eerror "${SVCNAME} will be started in the ${BOOTLEVEL} runlevel"
45 if [[ ! -L /dev/.rcboot/"${SVCNAME}" ]] ; then
46 [[ ! -d /dev/.rcboot ]] && mkdir /dev/.rcboot
47 ln -snf "$1" /dev/.rcboot/"${SVCNAME}"
48 fi
49 exit 1
50 fi
51
52 # Only hotplug if we're allowed to
53 if [[ ${IN_HOTPLUG} == "1" ]] ; then
54 if [[ ${RC_HOTPLUG:-yes} != "yes" ]] ; then
55 eerror "${SVCNAME} is not allowed to be hotplugged"
56 exit 1
57 fi
58
59 set -f
60 for x in ${RC_PLUG_SERVICES} ; do
61 [[ ${SVCNAME} == ${x} ]] && break
62 if [[ "!${SVCNAME}" == ${x} ]] ; then
63 eerror "${SVCNAME} is not allowed to be hotplugged"
64 exit 1
65 fi
66 done
67 set +f
68 fi
69
70 # State variables
71 svcpause="no"
72 svcrestart="no"
73
74 # Functions to handle dependencies and services
75 [[ ${RC_GOT_SERVICES} != "yes" ]] && source "${svclib}/sh/rc-services.sh"
76 # Functions to control daemons
77 [[ ${RC_GOT_DAEMON} != "yes" ]] && source "${svclib}/sh/rc-daemon.sh"
78
79 # Source configuration files.
80 # (1) Source /etc/conf.d/net if it is a net.* service
81 # (2) Source /etc/conf.d/${SVCNAME} to get initscript-specific
82 # configuration (if it exists).
83 # (3) Source /etc/rc.conf to pick up potentially overriding
84 # configuration, if the system administrator chose to put it
85 # there (if it exists).
86 if net_service "${SVCNAME}" ; then
87 conf="$(add_suffix /etc/conf.d/net)"
88 [[ -e ${conf} ]] && source "${conf}"
89 fi
90 conf="$(add_suffix "/etc/conf.d/${SVCNAME}")"
91 [[ -e ${conf} ]] && source "${conf}"
92 conf="$(add_suffix /etc/rc.conf)"
93 [[ -e ${conf} ]] && source "${conf}"
94
95 mylevel="${SOFTLEVEL}"
96 [[ ${SOFTLEVEL} == "${BOOTLEVEL}" \
97 || ${SOFTLEVEL} == "reboot" || ${SOFTLEVEL} == "shutdown" ]] \
98 && mylevel="${DEFAULTLEVEL}"
99
100 # Call svc_quit if we abort AND we have obtained a lock
101 service_started "${SVCNAME}"
102 svcstarted="$?"
103 service_inactive "${SVCNAME}"
104 svcinactive="$?"
105 svc_quit() {
106 eerror "ERROR: ${SVCNAME} caught an interrupt"
107 if service_inactive "${SVCNAME}" || [[ ${svcinactive} == "0" ]] ; then
108 mark_service_inactive "${SVCNAME}"
109 elif [[ ${svcstarted} == "0" ]] ; then
110 mark_service_started "${SVCNAME}"
111 else
112 mark_service_stopped "${SVCNAME}"
113 fi
114 exit 1
115 }
116
117 usage() {
118 local IFS="|"
119 myline="Usage: ${SVCNAME} { $* "
120 echo
121 eerror "${myline}}"
122 eerror " ${SVCNAME} without arguments for full help"
123 }
124
125 stop() {
126 # Return success so the symlink gets removed
127 return 0
128 }
129
130 start() {
131 eerror "ERROR: ${SVCNAME} does not have a start function."
132 # Return failure so the symlink doesn't get created
133 return 1
134 }
135
136 restart() {
137 svc_restart
138 }
139
140 status() {
141 # Dummy function
142 return 0
143 }
144
145 svc_schedule_start() {
146 local service="$1" start="$2"
147 [[ ! -d "${svcdir}/scheduled/${service}" ]] \
148 && mkdir -p "${svcdir}/scheduled/${service}"
149 [[ ! -e "${svcdir}/scheduled/${service}/${start}" ]] \
150 && ln -snf "/etc/init.d/${service}" \
151 "${svcdir}/scheduled/${service}/${start}"
152 }
153
154 svc_start_scheduled() {
155 [[ ! -d "${svcdir}/scheduled/${SVCNAME}" ]] && return
156 local x= services=
157
158 for x in $(dolisting "${svcdir}/scheduled/${SVCNAME}/") ; do
159 services="${services} ${x##*/}"
160 done
161
162 for x in ${services} ; do
163 service_stopped "${x}" && start_service "${x}"
164 rm -f "${svcdir}/scheduled/${SVCNAME}/${x}"
165 done
166
167 rmdir "${svcdir}/scheduled/${SVCNAME}"
168 }
169
170 svc_stop() {
171 local x= mydep= mydeps= retval=0
172 local -a servicelist=()
173
174 # Do not try to stop if it had already failed to do so
175 if is_runlevel_stop && service_failed "${SVCNAME}" ; then
176 return 1
177 elif service_stopped "${SVCNAME}" ; then
178 ewarn "WARNING: ${SVCNAME} has not yet been started."
179 return 0
180 fi
181 if ! mark_service_stopping "${SVCNAME}" ; then
182 eerror "ERROR: ${SVCNAME} is already stopping."
183 return 1
184 fi
185
186 # Ensure that we clean up if we abort for any reason
187 trap "svc_quit" INT QUIT TSTP
188
189 mark_service_starting "${SVCNAME}"
190 service_message "Service ${SVCNAME} stopping"
191
192 if in_runlevel "${SVCNAME}" "${BOOTLEVEL}" && \
193 [[ ${SOFTLEVEL} != "reboot" && ${SOFTLEVEL} != "shutdown" && \
194 ${SOFTLEVEL} != "single" ]] ; then
195 ewarn "WARNING: you are stopping a boot service."
196 fi
197
198 if [[ ${svcpause} != "yes" && ${RC_NO_DEPS} != "yes" ]] ; then
199 if net_service "${SVCNAME}" ; then
200 is_net_up || mydeps="net"
201 fi
202 mydeps="${mydeps} ${SVCNAME}"
203 fi
204
205 # Save the IN_BACKGROUND var as we need to clear it for stopping depends
206 local ib_save="${IN_BACKGROUND}"
207 unset IN_BACKGROUND
208
209 for mydep in ${mydeps} ; do
210 for x in $(needsme "${mydep}") ; do
211 if service_started "${x}" || service_inactive "${x}" ; then
212 stop_service "${x}"
213 fi
214 service_list=( "${service_list[@]}" "${x}" )
215 done
216 done
217
218 for x in "${service_list[@]}" ; do
219 # We need to test if the service has been marked stopped
220 # as the fifo may still be around if called by custom code
221 # such as postup from a net script.
222 service_stopped "${x}" && continue
223 wait_service "${x}"
224 if ! service_stopped "${x}" ; then
225 retval=1
226 break
227 fi
228 done
229
230 IN_BACKGROUND="${ib_save}"
231
232 if [[ ${retval} != "0" ]] ; then
233 eerror "ERROR: problems stopping dependent services."
234 eerror " ${SVCNAME} is still up."
235 else
236 # Now that deps are stopped, stop our service
237 (
238 exit() {
239 RC_QUIET_STDOUT="no"
240 eerror "DO NOT USE EXIT IN INIT.D SCRIPTS"
241 eerror "This IS a bug, please fix your broken init.d"
242 unset -f exit
243 exit "$@"
244 }
245 # Stop einfo/ebegin/eend from working as parallel messes us up
246 if [[ ${RC_PARALLEL_STARTUP} == "yes" ]] ; then
247 [[ ${RC_VERBOSE} != "yes" \
248 || -e ${svcdir}/exclusive/${SVCNAME} ]] \
249 && RC_QUIET_STDOUT="yes"
250 fi
251 stop
252 )
253 retval="$?"
254
255 # If a service has been marked inactive, exit now as something
256 # may attempt to start it again later
257 if [[ ${retval} == "0" ]] && service_inactive "${SVCNAME}" ; then
258 svcinactive=0
259 return 0
260 fi
261 fi
262
263 if [[ ${retval} != 0 ]] ; then
264 # Did we fail to stop? create symlink to stop multible attempts at
265 # runlevel change. Note this is only used at runlevel change ...
266 is_runlevel_stop && mark_service_failed "${SVCNAME}"
267
268 # If we are halting the system, do it as cleanly as possible
269 if [[ ${SOFTLEVEL} == "reboot" || ${SOFTLEVEL} == "shutdown" ]] ; then
270 mark_service_stopped "${SVCNAME}"
271 else
272 if [[ ${svcinactive} == "0" ]] ; then
273 mark_service_inactive "${SVCNAME}"
274 else
275 mark_service_started "${SVCNAME}"
276 fi
277 fi
278
279 service_message "eerror" "ERROR: ${SVCNAME} failed to stop"
280 else
281 svcstarted=1
282 if service_inactive "${SVCNAME}" ; then
283 svcinactive=0
284 else
285 mark_service_stopped "${SVCNAME}"
286 fi
287 service_message "Service ${SVCNAME} stopped"
288 fi
289
290 # Reset the trap
291 svc_trap
292
293 return "${retval}"
294 }
295
296 svc_start() {
297 local x= y= retval=0 startfail= startinactive=
298
299 # Do not try to start if i have done so already on runlevel change
300 if is_runlevel_start && service_failed "${SVCNAME}" ; then
301 return 1
302 elif service_started "${SVCNAME}" ; then
303 ewarn "WARNING: ${SVCNAME} has already been started."
304 return 0
305 elif service_inactive "${SVCNAME}" ; then
306 if [[ ${IN_BACKGROUND} != "true" ]] ; then
307 ewarn "WARNING: ${SVCNAME} has already been started."
308 return 0
309 fi
310 fi
311
312 if ! mark_service_starting "${SVCNAME}" ; then
313 if service_stopping "${SVCNAME}" ; then
314 eerror "ERROR: ${SVCNAME} is already stopping."
315 else
316 eerror "ERROR: ${SVCNAME} is already starting."
317 fi
318 return 1
319 fi
320
321 # Ensure that we clean up if we abort for any reason
322 trap "svc_quit" INT QUIT TSTP
323
324 service_message "Service ${SVCNAME} starting"
325
326 if broken "${SVCNAME}" ; then
327 eerror "ERROR: Some services needed are missing. Run"
328 eerror " './${SVCNAME} broken' for a list of those"
329 eerror " services. ${SVCNAME} was not started."
330 retval=1
331 fi
332
333 # Save the IN_BACKGROUND var as we need to clear it for starting depends
334 local ib_save="${IN_BACKGROUND}"
335 unset IN_BACKGROUND
336
337 if [[ ${retval} == "0" && ${RC_NO_DEPS} != "yes" ]] ; then
338 local startupservices="$(ineed "${SVCNAME}") $(valid_iuse "${SVCNAME}")"
339 local netservices=
340 for x in $(dolisting "/etc/runlevels/${BOOTLEVEL}/net.*") \
341 $(dolisting "/etc/runlevels/${mylevel}/net.*") ; do
342 netservices="${netservices} ${x##*/}"
343 done
344
345 # Start dependencies, if any.
346 if ! is_runlevel_start ; then
347 for x in ${startupservices} ; do
348 if [[ ${x} == "net" ]] && ! net_service "${SVCNAME}" \
349 && ! is_net_up ; then
350 for y in ${netservices} ; do
351 service_stopped "${y}" && start_service "${y}"
352 done
353 elif [[ ${x} != "net" ]] ; then
354 service_stopped "${x}" && start_service "${x}"
355 fi
356 done
357 fi
358
359 # We also wait for any services we're after to finish incase they
360 # have a "before" dep but we don't dep on them.
361 if is_runlevel_start ; then
362 startupservices="${startupservices} $(valid_iafter "${SVCNAME}")"
363 if net_service "${SVCNAME}" ; then
364 startupservices="${startupservices} $(valid_iafter "net")"
365 fi
366 fi
367
368 if [[ " ${startupservices} " == *" net "* ]] ; then
369 startupservices=" ${startupservices} "
370 startupservices="${startupservices/ net / ${netservices} }"
371 startupservices="${startupservices// net /}"
372 fi
373
374 # Wait for dependencies to finish.
375 for x in ${startupservices} ; do
376 service_started "${x}" && continue
377 wait_service "${x}"
378 if ! service_started "${x}" ; then
379 # A 'need' dependency is critical for startup
380 if ineed -t "${SVCNAME}" "${x}" >/dev/null \
381 || net_service "${x}" && ineed -t "${SVCNAME}" net \
382 && ! is_net_up ; then
383 if service_inactive "${x}" || service_wasinactive "${x}" || \
384 [[ -n $(ls "${svcdir}"/scheduled/*/"${x}" 2>/dev/null) ]] ; then
385 if svc_schedule_start "${x}" "${SVCNAME}" ; then
386 [[ -n ${startinactive} ]] && startinactive="${startinactive}, "
387 startinactive="${startinactive}${x}"
388 fi
389 else
390 startfail="${x}"
391 break
392 fi
393 fi
394 fi
395 done
396
397 if [[ -n ${startfail} ]] ; then
398 eerror "ERROR: Problem starting needed service ${startfail}"
399 eerror " ${SVCNAME} was not started."
400 retval=1
401 elif [[ -n ${startinactive} ]] ; then
402 # Change the last , to or for correct grammar.
403 x="${startinactive##*, }"
404 startinactive="${startinactive/%, ${x}/ or ${x}}"
405 ewarn "WARNING: ${SVCNAME} is scheduled to start when ${startinactive} has started."
406 retval=1
407 fi
408 fi
409
410 if [[ ${retval} == "0" ]] ; then
411 IN_BACKGROUND="${ib_save}"
412 (
413 exit() {
414 RC_QUIET_STDOUT="no"
415 eerror "DO NOT USE EXIT IN INIT.D SCRIPTS"
416 eerror "This IS a bug, please fix your broken init.d"
417 unset -f exit
418 exit "$@"
419 }
420
421 # Apply any ulimits if defined
422 [[ -n ${RC_ULIMIT} ]] && ulimit ${RC_ULIMIT}
423
424 # Stop einfo/ebegin/eend from working as parallel messes us up
425 if [[ ${RC_PARALLEL_STARTUP} == "yes" ]] ; then
426 [[ ${RC_VERBOSE} != "yes" \
427 || -e ${svcdir}/exclusive/${SVCNAME} ]] \
428 && RC_QUIET_STDOUT="yes"
429 fi
430
431 start
432 )
433 retval="$?"
434
435 # If a service has been marked inactive, exit now as something
436 # may attempt to start it again later
437 if [[ ${retval} == "0" ]] && service_inactive "${SVCNAME}" ; then
438 svcinactive=0
439 service_message "ewarn" "WARNING: ${SVCNAME} has started but is inactive"
440 return 1
441 fi
442 fi
443
444 if [[ ${retval} != "0" ]] ; then
445 if [[ ${svcinactive} == "0" ]] ; then
446 mark_service_inactive "${SVCNAME}"
447 else
448 mark_service_stopped "${SVCNAME}"
449 fi
450
451 if [[ -z ${startinactive} ]] ; then
452 is_runlevel_start && mark_service_failed "${SVCNAME}"
453 service_message "eerror" "ERROR: ${SVCNAME} failed to start"
454 fi
455 else
456 svcstarted=0
457 mark_service_started "${SVCNAME}"
458 service_message "Service ${SVCNAME} started"
459 fi
460
461 # Reset the trap
462 svc_trap
463
464 return "${retval}"
465 }
466
467 svc_restart() {
468 if ! service_stopped "${SVCNAME}" ; then
469 svc_stop || return "$?"
470 fi
471 svc_start
472 }
473
474 svc_status() {
475 # The basic idea here is to have some sort of consistent
476 # output in the status() function which scripts can use
477 # as an generic means to detect status. Any other output
478 # should thus be formatted in the custom status() function
479 # to work with the printed " * status: foo".
480 local efunc="" state=""
481
482 # If we are effectively root, check to see if required daemons are running
483 # and update our status accordingly
484 [[ ${EUID} == 0 ]] && update_service_status "${SVCNAME}"
485
486 if service_stopping "${SVCNAME}" ; then
487 efunc="eerror"
488 state="stopping"
489 elif service_starting "${SVCNAME}" ; then
490 efunc="einfo"
491 state="starting"
492 elif service_inactive "${SVCNAME}" ; then
493 efunc="ewarn"
494 state="inactive"
495 elif service_started "${SVCNAME}" ; then
496 efunc="einfo"
497 state="started"
498 else
499 efunc="eerror"
500 state="stopped"
501 fi
502 [[ ${RC_QUIET_STDOUT} != "yes" ]] \
503 && ${efunc} "status: ${state}"
504
505 status
506 # Return 0 if started, otherwise 1
507 [[ ${state} == "started" ]]
508 }
509
510 rcscript_errors="$(bash -n "${myscript}" 2>&1)" || {
511 [[ -n ${rcscript_errors} ]] && echo "${rcscript_errors}" >&2
512 eerror "ERROR: ${myscript} has syntax errors in it; aborting ..."
513 exit 1
514 }
515
516 # set *after* wrap_rcscript, else we get duplicates.
517 opts="start stop restart"
518
519 source "${myscript}"
520
521 # make sure whe have valid $opts
522 if [[ -z ${opts} ]] ; then
523 opts="start stop restart"
524 fi
525
526 svc_homegrown() {
527 local x arg="$1"
528 shift
529
530 # Walk through the list of available options, looking for the
531 # requested one.
532 for x in ${opts} ; do
533 if [[ ${x} == "${arg}" ]] ; then
534 if typeset -F "${x}" &>/dev/null ; then
535 # Run the homegrown function
536 "${x}"
537
538 return $?
539 fi
540 fi
541 done
542 x=""
543
544 # If we're here, then the function wasn't in $opts.
545 [[ -n $* ]] && x="/ $* "
546 eerror "ERROR: wrong args ( "${arg}" ${x})"
547 # Do not quote this either ...
548 usage ${opts}
549 exit 1
550 }
551
552 shift
553 if [[ $# -lt 1 ]] ; then
554 eerror "ERROR: not enough args."
555 usage ${opts}
556 exit 1
557 fi
558 for arg in $* ; do
559 case "${arg}" in
560 --quiet)
561 RC_QUIET="yes"
562 RC_QUIET_STDOUT="yes"
563 ;;
564 # We check this in functions.sh ...
565 # --nocolor)
566 # RC_NOCOLOR="yes"
567 # ;;
568 --nodeps)
569 RC_NO_DEPS="yes"
570 ;;
571 --verbose)
572 RC_VERBOSE="yes"
573 ;;
574 esac
575 done
576
577 retval=0
578 for arg in $* ; do
579 case "${arg}" in
580 stop)
581 if [[ -e "${svcdir}/scheduled/${SVCNAME}" ]] ; then
582 rm -Rf "${svcdir}/scheduled/${SVCNAME}"
583 fi
584
585 # Stoped from the background - treat this as a restart so that
586 # stopped services come back up again when started.
587 if [[ ${IN_BACKGROUND} == "true" ]] ; then
588 rm -rf "${svcdir}/snapshot/$$"
589 mkdir -p "${svcdir}/snapshot/$$"
590 cp -pP "${svcdir}"/started/* "${svcdir}/snapshot/$$/"
591 rm -f "${svcdir}/snapshot/$$/${SVCNAME}"
592 fi
593
594 svc_stop
595 retval="$?"
596
597 if [[ ${IN_BACKGROUND} == "true" ]] ; then
598 for x in $(dolisting "${svcdir}/snapshot/$$/") ; do
599 if [[ -x ${x} ]] && service_stopped "${x##*/}" ; then
600 svc_schedule_start "${SVCNAME}" "${x##*/}"
601 fi
602 done
603 else
604 rm -f "${svcdir}"/scheduled/*/"${SVCNAME}"
605 fi
606
607 ;;
608 start)
609 svc_start
610 retval="$?"
611 service_started "${SVCNAME}" && svc_start_scheduled
612 ;;
613 needsme|ineed|usesme|iuse|broken)
614 trace_dependencies "-${arg}"
615 ;;
616 status)
617 svc_status
618 retval="$?"
619 ;;
620 zap)
621 einfo "Manually resetting ${SVCNAME} to stopped state."
622 mark_service_stopped "${SVCNAME}"
623 ;;
624 restart)
625 svcrestart="yes"
626
627 # We don't kill child processes if we're restarting
628 # This is especically important for sshd ....
629 RC_KILL_CHILDREN="no"
630
631 # Create a snapshot of started services
632 rm -rf "${svcdir}/snapshot/$$"
633 mkdir -p "${svcdir}/snapshot/$$"
634 cp -pP "${svcdir}"/started/* "${svcdir}/snapshot/$$/"
635 rm -f "${svcdir}/snapshot/$$/${SVCNAME}"
636
637 # Simple way to try and detect if the service use svc_{start,stop}
638 # to restart if it have a custom restart() funtion.
639 if [[ -n $(egrep '^[[:space:]]*restart[[:space:]]*()' "/etc/init.d/${SVCNAME}") ]] ; then
640 if [[ -z $(egrep 'svc_stop' "/etc/init.d/${SVCNAME}") || \
641 -z $(egrep 'svc_start' "/etc/init.d/${SVCNAME}") ]] ; then
642 echo
643 ewarn "Please use 'svc_stop; svc_start' and not 'stop; start' to"
644 ewarn "restart the service in its custom 'restart()' function."
645 ewarn "Run ${SVCNAME} without arguments for more info."
646 echo
647 svc_restart
648 else
649 restart
650 fi
651 else
652 restart
653 fi
654 retval="$?"
655
656 [[ -e "${svcdir}/scheduled/${SVCNAME}" ]] \
657 && rm -Rf "${svcdir}/scheduled/${SVCNAME}"
658
659 # Restart dependencies as well
660 for x in $(dolisting "${svcdir}/snapshot/$$/") ; do
661 if [[ -x ${x} ]] && service_stopped "${x##*/}" ; then
662 if service_inactive "${SVCNAME}" \
663 || service_wasinactive "${SVCNAME}" ; then
664 svc_schedule_start "${SVCNAME}" "${x##*/}"
665 ewarn "WARNING: ${x##*/} is scheduled to start when ${SVCNAME} has started."
666 elif service_started "${SVCNAME}" ; then
667 start_service "${x##*/}"
668 fi
669 fi
670 done
671 rm -rf "${svcdir}/snapshot/$$"
672
673 service_started "${SVCNAME}" && svc_start_scheduled
674
675 # Wait for services to come up
676 [[ ${RC_PARALLEL_STARTUP} == "yes" ]] && wait
677
678 svcrestart="no"
679 ;;
680 pause)
681 svcpause="yes"
682 svc_stop
683 retval="$?"
684 svcpause="no"
685 ;;
686 --quiet|--nocolor|--nodeps|--verbose)
687 ;;
688 help)
689 exec "${svclib}"/sh/rc-help.sh "${myscript}" help
690 ;;
691 *)
692 # Allow for homegrown functions
693 svc_homegrown ${arg}
694 retval="$?"
695 ;;
696 esac
697 done
698
699 exit "${retval}"
700
701 # vim:ts=4

Properties

Name Value
svn:eol-style native
svn:executable *
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.20