/[baselayout]/trunk/sbin/runscript.sh
Gentoo

Contents of /trunk/sbin/runscript.sh

Parent Directory Parent Directory | Revision Log Revision Log


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