summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorChristian Heim <phreak@gentoo.org>2005-09-03 18:27:22 +0000
committerChristian Heim <phreak@gentoo.org>2005-09-03 18:27:22 +0000
commitfc92ebce9e8d5a431351300da5132d15971ba603 (patch)
tree40a3b41e8dc1fa7acca78a0b6fc44b6a280b3b32 /sbin
parentRemoving invalid init-scripts of boot and default (diff)
downloadbaselayout-vserver-fc92ebce9e8d5a431351300da5132d15971ba603.tar.gz
baselayout-vserver-fc92ebce9e8d5a431351300da5132d15971ba603.tar.bz2
baselayout-vserver-fc92ebce9e8d5a431351300da5132d15971ba603.zip
Removing any reference to $NET
svn path=/baselayout-vserver/trunk/; revision=17
Diffstat (limited to 'sbin')
-rwxr-xr-xsbin/runscript.sh80
1 files changed, 9 insertions, 71 deletions
diff --git a/sbin/runscript.sh b/sbin/runscript.sh
index 0c13372..a838535 100755
--- a/sbin/runscript.sh
+++ b/sbin/runscript.sh
@@ -30,26 +30,14 @@ myservice=${myservice##*/}
export SVCNAME=${myservice}
mylevel=$(<"${svcdir}/softlevel")
-# Set $IFACE to the name of the network interface if it is a 'net.*' script
-if [[ ${myservice%%.*} == "net" ]] && [[ ${myservice##*.} != ${myservice} ]] ; then
- IFACE=${myservice##*.}
- NETSERVICE="yes"
-else
- IFACE=
- NETSERVICE=
-fi
-
# Source configuration files.
# (1) Source /etc/conf.d/${myservice} to get initscript-specific
# configuration (if it exists).
-# (2) Source /etc/conf.d/net if it is a net.* service
-# (3) Source /etc/rc.conf to pick up potentially overriding
+# (2) Source /etc/rc.conf to pick up potentially overriding
# configuration, if the system administrator chose to put it
# there (if it exists).
[[ -e $(add_suffix /etc/conf.d/${myservice}) ]] && source "$(add_suffix /etc/conf.d/${myservice})"
-[[ -e $(add_suffix /etc/conf.d/net) ]] && \
-[[ ${NETSERVICE} == "yes" ]] && source "$(add_suffix /etc/conf.d/net)"
[[ -e $(add_suffix /etc/rc.conf) ]] && source "$(add_suffix /etc/rc.conf)"
usage() {
@@ -116,22 +104,7 @@ svc_stop() {
fi
if [[ ${svcpause} != "yes" ]] ; then
- if [[ ${NETSERVICE} == "yes" ]] ; then
- # A net.* service
- if in_runlevel "${myservice}" "${BOOTLEVEL}" || \
- in_runlevel "${myservice}" "${mylevel}"
- then
- # Only worry about net.* services if this is the last one running,
- # or if RC_NET_STRICT_CHECKING is set ...
- if ! is_net_up ; then
- mydeps="net"
- fi
- fi
-
- mydeps="${mydeps} ${myservice}"
- else
- mydeps=${myservice}
- fi
+ mydeps=${myservice}
fi
# Save the IN_BACKGROUND var as we need to clear it for stopping depends
@@ -298,53 +271,18 @@ svc_start() {
# Start dependencies, if any
for x in ${startupservices} ; do
- if [[ ${x} == "net" ]] && [[ ${NETSERVICE} != "yes" ]] && ! is_net_up ; then
- local netservices="$(dolisting "/etc/runlevels/${BOOTLEVEL}/net.*") \
- $(dolisting "/etc/runlevels/${mylevel}/net.*")"
-
- for y in ${netservices} ; do
- mynetservice=${y##*/}
- if service_stopped "${mynetservice}" ; then
- start_service "${mynetservice}"
- fi
- done
- elif [[ ${x} != "net" ]] ; then
- if service_stopped "${x}"; then
- start_service "${x}"
- fi
+ if service_stopped "${x}"; then
+ start_service "${x}"
fi
done
# wait for dependencies to finish
for x in ${startupservices} ; do
- if [ "${x}" = "net" -a "${NETSERVICE}" != "yes" ] ; then
- local netservices="$(dolisting "/etc/runlevels/${BOOTLEVEL}/net.*") \
- $(dolisting "/etc/runlevels/${mylevel}/net.*")"
-
- for y in ${netservices} ; do
- mynetservice="${y##*/}"
-
- wait_service "${mynetservice}"
-
- if ! service_started "${mynetservice}" ; then
- # A 'need' dependency is critical for startup
- if ineed -t "${myservice}" "${x}" >/dev/null ; then
- # Only worry about a net.* service if we do not have one
- # up and running already, or if RC_NET_STRICT_CHECKING
- # is set ....
- if ! is_net_up ; then
- startfail="yes"
- fi
- fi
- fi
- done
- elif [ "${x}" != "net" ] ; then
- wait_service "${x}"
- if ! service_started "${x}" ; then
- # A 'need' dependacy is critical for startup
- if ineed -t "${myservice}" "${x}" >/dev/null ; then
- startfail="yes"
- fi
+ wait_service "${x}"
+ if ! service_started "${x}" ; then
+ # A 'need' dependacy is critical for startup
+ if ineed -t "${myservice}" "${x}" >/dev/null ; then
+ startfail="yes"
fi
fi
done