From: Roland Moriz (roland_at_moriz.de)
Date: Wed 25 Jun 2003 - 22:57:07 BST
Hi,
fixed this problem on SuSE 8.x with the following changes:
--- SKEL_8.2_ORIG/etc/init.d/rc Tue Mar 18 14:24:52 2003
+++ SKEL_8.2_MINIMUM_APT/etc/init.d/rc Wed Jun 25 11:59:45 2003
@@ -124,16 +125,17 @@
#
# Get terminal size of standard input of the system console
#
-test -z "$CONSOLE" && CONSOLE=/dev/console
-set -- $(stty size < $CONSOLE)
- LINES=$1
-COLUMNS=$2
+#test -z "$CONSOLE" && CONSOLE=/dev/console
+#set -- $(stty size < $CONSOLE)
+
+LINES=44
+COLUMNS=125
export LINES COLUMNS CONSOLE
#
# Set I/O of this script and its childs to console
#
-exec 0<> $CONSOLE 1>&0 2>&0
+#exec 0<> $CONSOLE 1>&0 2>&0
#
# This redirects all rc messages during reboot and halt
Also changed vserver script:
diff -u /usr/sbin/vserver.orig /usr/sbin/vserver
--- /usr/sbin/vserver.orig Sun Jun 22 08:57:47 2003
+++ /usr/sbin/vserver Wed Jun 25 23:39:12 2003
@@ -400,7 +400,7 @@
FLAGS=
CAPS=
get_initdefault $1
- STARTCMD="/etc/rc.d/rc $INITDEFAULT"
+ STARTCMD="/etc/init.d/rc $INITDEFAULT"
if [ -x /vservers/$1/etc/init.d/rc ] ; then
STARTCMD="/etc/init.d/rc $INITDEFAULT"
fi
@@ -415,7 +415,7 @@
fakeinit)
FAKEINIT=true
FLAGS="$FLAGS --flag $f"
- STARTCMD=/sbin/init
+ STARTCMD="/etc/init.d/rc $INITDEFAULT"
DISCONNECT=--disconnect
;;
*)
@@ -423,7 +423,7 @@
;;
esac
done
- if [ "$FAKEINIT" = "" ] ; then
+ if [ "$FAKEINIT" = "true" ] ; then
$USR_LIB_VSERVER/fakerunlevel $INITDEFAULT
var/run/utmp
fi
for f in $S_CAPS dummy
@@ -464,6 +464,7 @@
cd /vservers/$1
IPOPT=`setipopt $IPROOT`
export PATH=/sbin:/usr/sbin:/bin:/usr/bin
+ export RUNLEVEL=$INITDEFAULT
$NICECMD $CHBIND_CMD $SILENT $IPOPT --bcast $IPROOTBCAST
\
$CHCONTEXT_CMD $SILENT $DISCONNECT $CAPS $FLAGS
$CTXOPT $HOSTOPT $DOMAINOPT --secure \
$SAVE_S_CONTEXT_CMD /var/run/vservers/$1.ctx \
@@ -511,6 +512,7 @@
mountproc /vservers/$1
# The fakeinit flag tell us how to turn off the server
get_initdefault $1
+ export RUNLEVEL=$INITDEFAULT
export PREVLEVEL=$INITDEFAULT
STOPCMD="/etc/rc.d/rc 6"
if [ -x /vservers/$1/etc/init.d/rc ] ; then
not sure if this fakeinit thing is corrrect - i'm not running fakeinit
on my vservers.
s2:/home/vserver # vserver vse0012 start
Starting the virtual server vse0012
Server vse0012 is not running
ipv4root is now xxxxxxxxxxx
Host name is now vse0012
Domain name is now xxxxxx
New security context is 112
blogd: console=/dev/pts/6, stdin=/dev/pts/6, must differ, boot logging
disabled
Master Resource Control: previous runlevel: , switching to
runlevel: 3
Initializing random number
generator done
Starting syslog
services done
Starting service at
daemon done
Starting CRON
daemon done
Starting Name Service Cache
Daemon done
Starting SSH
daemon done
Master Resource Control: runlevel 3 has
been reached
s2:/home/vserver #
problems/questions -> mail
have fun,
regards,
Roland
Am Mon, 2003-06-23 um 10.52 schrieb Roland Moriz:
> Hi Max,
>
> Am Mon, 2003-06-23 um 09.40 schrieb Max Jakob:
> > Cathy Sarisky wrote:
> > > In your S_FLAGS setting in the config file, include 'fakeinit'.
> > >
> > This part of the config file looks like this:
> > ...
> > S_FLAGS="lock nproc sched fakeinit"
> > ULIMIT="-H -u 1000"
> > S_CAPS="CAP_SYS_ADMIN"
> > ...
> >
> > But no daemons are started automatically.
> >
> > New ideas?
>
> not really. I can confirm this behaviour on SuSE 8.1 and 8.2 on my
> vserver host. It looks like a bug in "vservers" that $STARTCMD is set
> somewhere only to run "/sbin/init" without a runlevel. Even with a
> manually added runlevel 3 (which is the default on SuSE) the init will
> fail:
>
> s2:~ # vserver vse0017 start
> Starting the virtual server vse0017
> Server vse0017 is not running
> ipv4root is now 10.0.200.17
> Host name is now vse0017
> Domain name is now vse.moriz.de
> New security context is 117
> s2:~ # init: No such process
>
> s2:~ #
>
>
> not sure if this makes sense: ;)
>
> --- /usr/sbin/vserver Mon Jun 23 04:54:01 2003
> +++ /usr/sbin/vserver~ Sun Jun 22 08:57:47 2003
> @@ -415,7 +415,7 @@
> fakeinit)
> FAKEINIT=true
> FLAGS="$FLAGS --flag $f"
> - STARTCMD="/sbin/init 3"
> + STARTCMD=/sbin/init
> DISCONNECT=--disconnect
> ;;
> *)
>
>
> with kind regards,
> Mit freundlichen Gruessen,
>
> Roland Moriz
with kind regards,
Mit freundlichen Gruessen,
Roland Moriz
-- Muenchen/Germany - http://www.roland-moriz.de/