/[vps]/baselayout-vserver/trunk/sbin/init-common-post.sh
Gentoo

Contents of /baselayout-vserver/trunk/sbin/init-common-post.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 276 - (show annotations) (download) (as text)
Thu Mar 9 10:07:19 2006 UTC (12 years, 5 months ago) by phreak
File MIME type: text/x-sh
File size: 1788 byte(s)
Merging r1939
1 # Copyright 1999-2006 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 # We set the forced softlevel from the kernel command line
5 # It needs to be run right after proc is mounted for the
6 # boot runlevel
7 setup_defaultlevels
8
9 # $BOOT can be used by rc-scripts to test if it is the first time
10 # the 'boot' runlevel is executed. Now also needed by some stuff in
11 # the 'sysinit' runlevel ...
12 export BOOT="yes"
13
14 # We first try to find a locally defined list of critical services
15 # for a particular runlevel. If we cannot find it, we use the
16 # defaults.
17 get_critical_services
18
19 export START_CRITICAL="yes"
20
21 # We do not want to break compatibility, so we do not fully integrate
22 # these into /sbin/rc, but rather start them by hand ...
23 for x in ${CRITICAL_SERVICES} ; do
24 if ! start_critical_service "${x}" ; then
25 echo
26 eerror "One of more critical startup scripts failed to start!"
27 einfo "Rebooting"
28 /sbin/reboot -f
29 fi
30 done
31
32 unset START_CRITICAL
33
34 # Check that $svcdir exists ...
35 check_statedir "${svcdir}"
36
37 # Clear $svcdir from stale entries, but leave the caches around, as it
38 # should help speed things up a bit
39 rm -rf $(ls -d1 "${svcdir}/"* 2>/dev/null | \
40 grep -ve '\(depcache\|deptree\|envcache\)')
41
42 echo "sysinit" > "${svcdir}/softlevel"
43
44 # Ensure all critical services have are in the boot runlevel
45 check_critical_services
46
47 # Update the dependency cache
48 /sbin/depscan.sh
49
50 # Now that the dependency cache are up to date, make sure these
51 # are marked as started ...
52 (
53 # Needed for mark_service_started()
54 source "${svclib}"/sh/rc-services.sh
55
56 for x in ${CRITICAL_SERVICES} ; do
57 mark_service_started "${x}"
58 done
59 )
60
61 # sysinit is now done, so allow init scripts to run normally
62 [[ -e /dev/.rcsysinit ]] && rm -f /dev/.rcsysinit
63
64 # vim:ts=4

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.20