summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenedikt Boehm <hollow@gentoo.org>2005-09-04 08:51:46 +0000
committerBenedikt Boehm <hollow@gentoo.org>2005-09-04 08:51:46 +0000
commit5ac04120bfc7c39000fb2f1864a5a51f0f823fa3 (patch)
treebf14e8731e88d975add85085036daffed9fd1099
parentremove single and splash (diff)
downloadbaselayout-vserver-5ac04120bfc7c39000fb2f1864a5a51f0f823fa3.tar.gz
baselayout-vserver-5ac04120bfc7c39000fb2f1864a5a51f0f823fa3.tar.bz2
baselayout-vserver-5ac04120bfc7c39000fb2f1864a5a51f0f823fa3.zip
add back help text
svn path=/baselayout-vserver/trunk/; revision=28
-rwxr-xr-xsbin/functions.sh16
-rwxr-xr-xsbin/rc22
-rwxr-xr-xsbin/rc-help.sh20
3 files changed, 21 insertions, 37 deletions
diff --git a/sbin/functions.sh b/sbin/functions.sh
index 71a9563..c6ac5d6 100755
--- a/sbin/functions.sh
+++ b/sbin/functions.sh
@@ -33,7 +33,6 @@ RC_ENDCOL="yes"
#
RC_TTY_NUMBER=0
RC_PARALLEL_STARTUP="no"
-RC_USE_CONFIG_PROFILE="yes"
#
# Default values for e-message indentation and dots
@@ -100,13 +99,6 @@ get_bootconfig() {
setup_defaultlevels() {
get_bootconfig
- if [ "${RC_USE_CONFIG_PROFILE}" = "yes" -a -n "${DEFAULTLEVEL}" ] && \
- [ -d "/etc/runlevels/${BOOTLEVEL}.${DEFAULTLEVEL}" -o \
- -L "/etc/runlevels/${BOOTLEVEL}.${DEFAULTLEVEL}" ]
- then
- export BOOTLEVEL="${BOOTLEVEL}.${DEFAULTLEVEL}"
- fi
-
if [ -z "${SOFTLEVEL}" ] ; then
if [ -f "${svcdir}/softlevel" ] ; then
export SOFTLEVEL="$(< ${svcdir}/softlevel)"
@@ -509,13 +501,7 @@ get_options() {
# Returns a config file name with the softlevel suffix
# appended to it. For use with multi-config services.
add_suffix() {
- if [ "${RC_USE_CONFIG_PROFILE}" = "yes" -a -e "$1.${DEFAULTLEVEL}" ]
- then
- echo "$1.${DEFAULTLEVEL}"
- else
- echo "$1"
- fi
-
+ echo "$1"
return 0
}
diff --git a/sbin/rc b/sbin/rc
index 1dc7ebf..c11c563 100755
--- a/sbin/rc
+++ b/sbin/rc
@@ -167,13 +167,6 @@ if [[ ${argv1} == "boot" ]]
then
setup_defaultlevels
- if [ -n "${DEFAULTLEVEL}" -a "${DEFAULTLEVEL}" != "default" ]
- then
- # Setup our default runlevel runlevel that will be run
- # the first time /sbin/rc is called with argv1 != sysinit|boot
- echo "${DEFAULTLEVEL}" > "${svcdir}/ksoftlevel"
- fi
-
# $BOOT can be used by rc-scripts to test if it is the first time
# the 'boot' runlevel is executed
export BOOT="yes"
@@ -181,11 +174,6 @@ then
# We reset argv1 to the bootlevel given on the kernel command line
# if there is one
argv1="${BOOTLEVEL}"
-
-elif [[ -e ${svcdir}/ksoftlevel ]]
-then
- argv1="$(< ${svcdir}/ksoftlevel)"
- rm -f "${svcdir}/ksoftlevel"
fi
source "${svclib}/sh/rc-services.sh"
@@ -411,19 +399,11 @@ done
# Clean the old runlevel
rm -rf "${svcdir}/softscripts.old" &>/dev/null
-# Depends gets nuked, so update them
-# (this problem should be solved now, but i think it will be a good idea
-# to recreate the deps after a change in runlevel)
-
-#/sbin/depscan.sh &>/dev/null
-
# Runlevel end, so clear stale fail list
rm -rf "${svcdir}/failed" &>/dev/null
# If we were in the boot runlevel, it is done now ...
-if [[ -n ${BOOT} ]]; then
- unset BOOT
-fi
+[[ -n ${BOOT} ]] && unset BOOT
# Remove the cached CONSOLETYPE
unset CONSOLETYPE
diff --git a/sbin/rc-help.sh b/sbin/rc-help.sh
index 499af88..2a28859 100755
--- a/sbin/rc-help.sh
+++ b/sbin/rc-help.sh
@@ -50,7 +50,8 @@ ${CYAN}Options:${OFF}
${GREEN}pause${OFF}
Same as 'stop', but the services that depends on it, will not be
- stopped.
+ stopped. This is useful for stopping a network interface without
+ stopping all the network services that depend on 'net'.
${GREEN}zap${OFF}
Reset a service that is currently stopped, but still marked as started,
@@ -155,6 +156,23 @@ ${CYAN}Dependencies:${OFF}
recommend using it with the 'need' or 'use' dependency type ... you have
been warned!
+${CYAN}'net' Dependency and 'net.*' Services:${OFF}
+ Example:
+
+ depend() {
+ need net
+ }
+
+ This is a special dependency of type 'need'. It represents a state where
+ a network interface or interfaces besides lo is up and active. Any service
+ starting with 'net.' will be treated as a part of the 'net' dependency,
+ if:
+
+ 1. It is part of the 'boot' runlevel
+ 2. It is part of the current runlevel
+
+ A few examples are the /etc/init.d/net.eth0 and /etc/init.d/net.lo services.
+
${CYAN}Configuration files:${OFF}
There are two files which will be sourced for possible configuration by
the rc-scripts. They are (sourced from top to bottom):