diff options
author | Benedikt Boehm <hollow@gentoo.org> | 2005-09-04 08:17:28 +0000 |
---|---|---|
committer | Benedikt Boehm <hollow@gentoo.org> | 2005-09-04 08:17:28 +0000 |
commit | aca365821fe1b82184c28bfbe68aad1f646f74cf (patch) | |
tree | 0e4871ce7473a51bb4caa019162e753e7b27216a | |
parent | remove useless stuff (diff) | |
download | baselayout-vserver-aca365821fe1b82184c28bfbe68aad1f646f74cf.tar.gz baselayout-vserver-aca365821fe1b82184c28bfbe68aad1f646f74cf.tar.bz2 baselayout-vserver-aca365821fe1b82184c28bfbe68aad1f646f74cf.zip |
remove useless stuff
svn path=/baselayout-vserver/trunk/; revision=26
-rwxr-xr-x | sbin/functions.sh | 110 |
1 files changed, 9 insertions, 101 deletions
diff --git a/sbin/functions.sh b/sbin/functions.sh index 92a2e25..71a9563 100755 --- a/sbin/functions.sh +++ b/sbin/functions.sh @@ -9,9 +9,6 @@ SVCDIR="/var/lib/supervise" # Check /etc/conf.d/rc for a description of these ... svcdir="/var/lib/init.d" svclib="/lib/rcscripts" -svcmount="no" -svcfstype="tmpfs" -svcsize=1024 # Different types of dependencies deptypes="need use" @@ -34,7 +31,7 @@ RC_ENDCOL="yes" # # Default values for rc system # -RC_TTY_NUMBER=11 +RC_TTY_NUMBER=0 RC_PARALLEL_STARTUP="no" RC_USE_CONFIG_PROFILE="yes" @@ -70,10 +67,6 @@ import_addon() { splash() { return 0 } -# This will override the splash() function... -if ! import_addon splash-functions.sh ; then - [ -f /sbin/splash-functions.sh ] && source /sbin/splash-functions.sh -fi # void profiling(...) # @@ -82,7 +75,6 @@ fi profiling() { return 0 } -import_addon profiling-functions.sh # void bootlog(...) # @@ -99,34 +91,8 @@ bootlog() { # parameters. # get_bootconfig() { - local copt= - local newbootlevel= - local newsoftlevel= - - if [[ -r /proc/cmdline ]] ; then - for copt in $(</proc/cmdline) ; do - case "${copt%=*}" in - bootlevel) - newbootlevel=${copt##*=} - ;; - softlevel) - newsoftlevel=${copt##*=} - ;; - esac - done - fi - - if [[ -n ${newbootlevel} ]] ; then - export BOOTLEVEL=${newbootlevel} - else - export BOOTLEVEL="boot" - fi - - if [[ -n ${newsoftlevel} ]] ; then - export DEFAULTLEVEL=${newsoftlevel} - else - export DEFAULTLEVEL="default" - fi + export BOOTLEVEL="boot" + export DEFAULTLEVEL="default" return 0 } @@ -134,13 +100,6 @@ get_bootconfig() { setup_defaultlevels() { get_bootconfig - if get_bootparam "noconfigprofile" ; then - export RC_USE_CONFIG_PROFILE="no" - - elif get_bootparam "configprofile" ; then - export RC_USE_CONFIG_PROFILE="yes" - fi - if [ "${RC_USE_CONFIG_PROFILE}" = "yes" -a -n "${DEFAULTLEVEL}" ] && \ [ -d "/etc/runlevels/${BOOTLEVEL}.${DEFAULTLEVEL}" -o \ -L "/etc/runlevels/${BOOTLEVEL}.${DEFAULTLEVEL}" ] @@ -324,11 +283,6 @@ _eend() { [[ ${RC_QUIET_STDOUT} == yes ]] && return 0 msg="${BRACKET}[ ${GOOD}ok${BRACKET} ]${NORMAL}" else - if [[ -c /dev/null ]]; then - rc_splash "stop" &>/dev/null & - else - rc_splash "stop" & - fi if [[ -n "$*" ]]; then ${efunc} "$*" fi @@ -471,34 +425,7 @@ get_KV() { # EXAMPLE: if get_bootparam "nodevfs" ; then .... # get_bootparam() { - local x copt params retval=1 - - [ ! -r "/proc/cmdline" ] && return 1 - - for copt in $(< /proc/cmdline) - do - if [ "${copt%=*}" = "gentoo" ] - then - params="$(gawk -v PARAMS="${copt##*=}" ' - BEGIN { - split(PARAMS, nodes, ",") - for (x in nodes) - print nodes[x] - }')" - - # Parse gentoo option - for x in ${params} - do - if [ "${x}" = "$1" ] - then -# echo "YES" - retval=0 - fi - done - fi - done - - return ${retval} + return 1 } # Safer way to list the contents of a directory, @@ -609,8 +536,7 @@ get_base_ver() { # EXAMPLE: if is_uml_sys ; then ... # is_uml_sys() { - grep -qs 'UML' /proc/cpuinfo - return $? + return 1 } # bool is_vserver_sys() @@ -620,8 +546,7 @@ is_uml_sys() { # EXAMPLE: if is_vserver_sys ; then ... # is_vserver_sys() { - grep -qs '^s_context:[[:space:]]*[1-9]' /proc/self/status - return $? + return 0 } # bool is_xenU_sys() @@ -631,7 +556,7 @@ is_vserver_sys() { # EXAMPLE: if is_xenU_sys ; then ... # is_xenU_sys() { - [[ -d /proc/xen && ! -f /proc/xen/privcmd ]] + return 1 } # bool get_mount_fstab(path) @@ -643,10 +568,7 @@ is_xenU_sys() { # mount -n ${cmd} # get_mount_fstab() { - awk '$1 ~ "^#" { next } - $2 == "'$*'" { stab="-t "$3" -o "$4" "$1" "$2; } - END { print stab; } - ' /etc/fstab + echo } # char *reverse_list(list) @@ -674,12 +596,6 @@ start_addon() { # Starts all volumes in RC_VOLUME_ORDER. # start_volumes() { - local x= - - for x in ${RC_VOLUME_ORDER}; do - start_addon "${x}" - done - return 0 } @@ -698,12 +614,6 @@ stop_addon() { # Stops all volumes in RC_VOLUME_ORDER (reverse order). # stop_volumes() { - local x= - - for x in $(reverse_list ${RC_VOLUME_ORDER}); do - stop_addon "${x}" - done - return 0 } @@ -787,9 +697,7 @@ if [ -z "${EBUILD}" ] ; then esac done - if [ -r "/proc/cmdline" ] ; then - setup_defaultlevels - fi + setup_defaultlevels else # Should we use colors ? if [[ $* != *depend* ]]; then |