From aca365821fe1b82184c28bfbe68aad1f646f74cf Mon Sep 17 00:00:00 2001 From: Benedikt Boehm Date: Sun, 4 Sep 2005 08:17:28 +0000 Subject: remove useless stuff svn path=/baselayout-vserver/trunk/; revision=26 --- sbin/functions.sh | 110 +++++------------------------------------------------- 1 file 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 $(/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 -- cgit v1.2.3-65-gdbad