On Tue, 12 Feb 2002, Phil Davey wrote:

> On Tue, 12 Feb 2002 [EMAIL PROTECTED] wrote:
> > You are correct, LTSP v3.0 ignores any runlevel specified in
> > the kernel command line, favoring instead what is set in
> > lts.conf.
>
> Oh dear.
> Is there any other way to achieve what I'm trying to do?
>
> > If you'd care to modify rc.local or the set_runlevel script
> > to allow the kernel command line to override what is in
> > lts.conf, i'd gladly accept that as an enhancement to ltsp.
>
> I might be being blind, but I can't see any difference between the 2.08
> and 3.0 files.
> What changed in 3.0 to make this happen?
> Where should I start looking to make this work again in 3.0?


Three files have to be modified, and compiling a new kernel is required,
too, because linuxrc is one of those files.

Here are the files resp. the beginning of the files.
I'm using a modified rc.local (to free up some space, as posted earlier to
the list), but here I've taken an original and modified it.

Tested it with different kernel commandline parameters set in a
dhcp option - seems to be working.

Wolfgang

Start of linuxrc (located in initrd/root)

-------------------/ snip /----------------------------
#!/bin/sh

#
# linuxrc file for initrd (Initial Ram Disk) for LTSP
...
# 09/02/2001 -jam- Initial writing of this script
#

echo "==================================================================="
echo "Running /linuxrc"

############# inserted -ws ##############################################
#
# Allow overriding of RUNLEVEL (as set in lts.conf) by kernel commandline
#
if [ -n "${RUNLEVEL}" ]; then
    echo "$RUNLEVEL" > /tmp/RUNLEVEL
fi
############## end insert ###############################################

echo "Mounting /proc"
mount -t proc /proc /proc
-----------------/ snip /-----------------------------------------------

Start of rc.local, located in /etc of the ltsp-tree

-----------------/ snip /-----------------------------------------------
#!/bin/sh
#
# rc.local
#
# This script will setup the environment for a diskless workstation, as
# part of the Linux Terminal Server Project (http://www.LTSP.org)
#
PATH=/bin:$PATH; export PATH
. /etc/ltsp_functions

/sbin/devfsd /dev

#
# Mount /proc before /tmp, so that we can display the progress
#
echo "Mounting /proc filesystem"
mount -n -t proc /proc /proc

#
# Get the runlevel for this workstation; added commandline support -ws
#
if [ -a /oldroot/tmp/RUNLEVEL ]; then
    RUNLEVEL=`cat /oldroot/tmp/RUNLEVEL`
    else
    RUNLEVEL=`get_cfg RUNLEVEL 5`
fi

# umount doesn'work, because dhclient is still running off oldroot -ws
# moved down nevertheless, because runlevel-setting needs oldroot  -ws
# Un-mount the initrd, to free up some space
#
umount /oldroot >/dev/null 2>&1

#
# Find out if we want to allow local applications
#

pr_set 67 "Checking for Local Apps"
-----------------/ snip /-----------------------------------------------

File set_runlevel, located in /bin of the ltsp-tree

-----------------/ snip /-----------------------------------------------
#!/bin/sh
#
# Set runlevel
#

. /etc/ltsp_functions

if [ -a /oldroot/tmp/RUNLEVEL ]; then
    RUNLEVEL=`cat /oldroot/tmp/RUNLEVEL`
    else
    RUNLEVEL=`get_cfg RUNLEVEL 5`
fi

/sbin/init ${RUNLEVEL}
-----------------/ snip /-----------------------------------------------


_____________________________________________________________________
Ltsp-discuss mailing list.   To un-subscribe, or change prefs, goto:
      https://lists.sourceforge.net/lists/listinfo/ltsp-discuss
For additional LTSP help,   try #ltsp channel on irc.openprojects.net

Reply via email to