/[gentoo-alt]/trunk/overlay/sys-apps/baselayout/files/baselayout-1.12.0_pre15-1839.patch
Gentoo

Contents of /trunk/overlay/sys-apps/baselayout/files/baselayout-1.12.0_pre15-1839.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1043 - (show annotations) (download)
Mon Feb 13 19:02:03 2006 UTC (8 years, 7 months ago) by flameeyes
File size: 2432 byte(s)
Start hacking at baselayout ebuilds so that it installs the base files for FreeBSD.
1 Index: sbin/runscript.sh
2 ===================================================================
3 --- sbin/runscript.sh (revision 1836)
4 +++ sbin/runscript.sh (working copy)
5 @@ -612,17 +612,24 @@
6 && rm -Rf "${svcdir}/scheduled/${myservice}"
7
8 # Restart dependencies as well
9 - if service_inactive "${myservice}" ; then
10 - for x in $(dolisting "${svcdir}/snapshot/$$/") ; do
11 - if service_stopped "${x##*/}" ; then
12 + for x in $(dolisting "${svcdir}/snapshot/$$/") ; do
13 + if service_stopped "${x##*/}" ; then
14 + if service_inactive "${myservice}" \
15 + || service_wasinactive "${myservice}" ; then
16 svc_schedule_start "${myservice}" "${x##*/}"
17 + ewarn "WARNING: ${x##*/} is scheduled to start when ${myservice} has started."
18 + else
19 + start_service "${x##*/}"
20 fi
21 - done
22 - elif service_started "${myservice}" ; then
23 - svc_start_scheduled
24 - fi
25 + fi
26 + done
27 + rm -rf "${svcdir}/snapshot/$$"
28 +
29 + service_started "${myservice}" && svc_start_scheduled
30
31 - rm -rf "${svcdir}/snapshot/$$"
32 + # Wait for services to come up
33 + [[ ${RC_PARALLEL_STARTUP} == "yes" ]] && wait
34 +
35 svcrestart="no"
36 ;;
37 pause)
38 Index: sbin/rc
39 ===================================================================
40 --- sbin/rc (revision 1836)
41 +++ sbin/rc (working copy)
42 @@ -172,6 +172,18 @@
43 return 0
44 }
45
46 +check_critical_services() {
47 + local x
48 +
49 + # Ensure that critical services are in the boot runlevel
50 + for x in ${CRITICAL_SERVICES} ; do
51 + if [[ ! -L "/etc/runlevels/${BOOTLEVEL}/${x}" ]] ; then
52 + ewarn "WARNING: Adding critical service ${x} to the ${BOOTLEVEL} runlevel"
53 + ln -snf "/etc/init.d/${x}" "/etc/runlevels/${BOOTLEVEL}/${x}"
54 + fi
55 + done
56 +}
57 +
58 # Save $1
59 argv1="$1"
60
61 @@ -501,6 +513,9 @@
62
63 echo "sysinit" > "${svcdir}/softlevel"
64
65 + # Ensure all critical services have are in the boot runlevel
66 + check_critical_services
67 +
68 # Update the dependency cache
69 /sbin/depscan.sh -u
70
71 @@ -598,6 +613,10 @@
72 exit 0
73 fi
74
75 +# Ensure that critical services are in the boot runlevel
76 +get_critical_services
77 +check_critical_services
78 +
79 source "${svclib}/sh/rc-services.sh"
80 [[ -e "${svcdir}/interactive" ]] \
81 && svcinteractive="$(<${svcdir}/interactive)"
82 @@ -637,13 +656,13 @@
83
84 splash "rc_init" "${argv1}"
85
86 +
87 if [ "${SOFTLEVEL}" = "reboot" -o "${SOFTLEVEL}" = "shutdown" ]
88 then
89 myscripts=
90
91 elif [ "${SOFTLEVEL}" = "single" ]
92 then
93 - get_critical_services
94
95 myscripts="${CRITICAL_SERVICES}"
96

  ViewVC Help
Powered by ViewVC 1.1.20