]> TLD Linux GIT Repositories - rc-scripts.git/blobdiff - lib/functions
- drop unused vserver stuff
[rc-scripts.git] / lib / functions
index fb41ffa17f86c6ee922679bc64e1bf5dd04151cc..012f59c1faab52b55a7034023bb555162202fce4 100644 (file)
@@ -39,7 +39,6 @@ BLUE=4
 MAGENTA=5
 CYAN=6
 WHITE=7
-NORMAL=15
 # Bold definition (second parameter to termput setaf)
 BOLD=1
 NOBOLD=0
@@ -53,59 +52,13 @@ CTLD="$GREEN"               # "TLD Linux" color
 CI="$RED"              # Capital I color (press I to enter interactive startup)
 CRESMAN="$GREEN"       # "Resource Manager" color
 CHARS=""               # Characters displayed on the beginning of show line
-CCHARS="$NORMAL"       # Color of these characters (look at /etc/sysconfig/init-colors.gentoo example)
+CCHARS="$WHITE"                # Color of these characters (look at /etc/sysconfig/init-colors.gentoo example)
 
 # Source configuration if available - may override default values
 [ -r /etc/sysconfig/init-colors ] && . /etc/sysconfig/init-colors
 [ -r /etc/sysconfig/system ] && . /etc/sysconfig/system
 [ -r /etc/sysconfig/bootsplash ] && . /etc/sysconfig/bootsplash
 
-if [ -z "$VSERVER" -o "$VSERVER" = "detect" ]; then
-       {
-               while read _f _ctx; do
-                       [ "$_f" = "VxID:" -o "$_f" = "s_context:" ] && break
-               done </proc/self/status
-       } 2>/dev/null
-       if [ -z "$_ctx" -o "$_ctx" = "0" ]; then
-               VSERVER=no
-       else
-               VSERVER=yes
-       fi
-       unset _f _ctx
-fi
-
-# VSERVER_ISOLATION_NET = isolation only inside of vserver guests
-if [ -z "$VSERVER_ISOLATION_NET" -o "$VSERVER_ISOLATION_NET" = "detect" ]; then
-       VSERVER_ISOLATION_NET=no
-       if [ "$VSERVER" = "yes" ]; then
-               if [ -f /proc/self/nsproxy ]; then
-                       # older kernels
-                       {
-                               while read _t _data; do
-                                       [ "$_t" = "net:" ] && break
-                               done < /proc/self/nsproxy
-                       } 2> /dev/null
-                       if [ "${_data##*\(}" = "I)" ]; then
-                               VSERVER_ISOLATION_NET=yes
-                       fi
-               elif [ -f /proc/self/ninfo ]; then
-                       # newer kernels
-                       {
-                               while read _t _data; do
-                                       [ "$_t" = "NCaps:" ] && break
-                               done < /proc/self/ninfo
-                       } 2> /dev/null
-                       if [ "${_t}" = "NCaps:" ]; then
-                               VSERVER_ISOLATION_NET=yes
-                       fi
-               else
-                       # assume (very?) old kernel mode
-                       VSERVER_ISOLATION_NET=yes
-               fi
-               unset _f _data
-       fi
-fi
-
 # we need to know in functions if we were called from a terminal
 if [ -z "$ISATTY" ]; then
        [ -t ] && ISATTY=yes || ISATTY=no
@@ -283,7 +236,7 @@ termput() {
                        is_yes "$COLOR_INIT" && echo -ne "\033[${ISBOLD};3${2}m"
                        ;;
                op)
-                       termput setaf $NORMAL
+                       echo -ne "\033[0m"
                        ;;
                esac
        else
@@ -296,7 +249,7 @@ termput() {
                        is_yes "$COLOR_INIT" && tput setaf "$2"
                        ;;
                op)
-                       termput setaf $NORMAL
+                       tput sgr0
                        ;;
                esac
        fi
@@ -359,7 +312,7 @@ nls() {
 rc_splash() {
        local action="$1"
 
-       if ! is_no "$BOOT_SPLASH" && ! is_yes "$VSERVER"; then
+       if ! is_no "$BOOT_SPLASH"; then
                [ -x /bin/splash ] && /bin/splash "$action"
        fi
 
@@ -473,7 +426,6 @@ checkpid() {
 # - inside chroot get only those processes, which are inside chroot.
 # - don't filter out pids which do not have corresponding running processes (process died etc)
 # (note: some processes like named are chrooted but run outside chroot)
-# - do nothing inside vserver
 filter_chroot() {
        # no pids, exit early
        [ $# -eq 0 ] && return
@@ -485,11 +437,6 @@ filter_chroot() {
                pids=$(filter_ns "$@") && set -- "$pids"
        fi
 
-       if is_yes "$VSERVER"; then
-               echo $@
-               return
-       fi
-
        if [ $# -lt 1 -o ! -d /proc/1 ]; then
                echo $@
                return