lkml.org 
[lkml]   [2002]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectDaemon killing in inittab
Date
Hi,
Sorry for posting in a wrong list. But i am facing a strange problem.
I am running HardHat linux 2.2 from montavista on a mips processor.

Whever I start a daemon in my rcS script, it gets killed as soon as login
prompt comes. I suspected change of runlevel causing the problem... but my
login prompt comes in runlevel S itself. If i change the last line to
<11:S:once:/bin/bash> the problem disappears. I am using a serial console.

please Cc me..

thanks
amol

----------------------------------------------

my inittab file is
------------------------------
# Default inittab for a busybox style setup
#
# System startup
::sysinit:/etc/init.d/rcS

# Format of terminals:
# <tty>::<action>:<process>

# Virtual Terminals
tty0::respawn:/sbin/getty 9600 tty0

# Serial Terminals
# ttyS2 for typhoon
# ttyS0::respawn:/sbin/getty -L ttyS0 9600 vt100
ttyS2::respawn:/sbin/getty -L ttyS2 9600 vt100
-------------------------------------------

my rcS script
---------------------

#
# rcS Call all S??* scripts in /etc/rcS.d in
# numerical/alphabetical order.
#
# Version: @(#)/etc/init.d/rcS 2.76 19-Apr-1999 miquels@cistron.nl
#

PATH=/sbin:/bin:/usr/sbin:/usr/bin
runlevel=S
prevlevel=N
umask 022
export PATH runlevel prevlevel

#
# See if system needs to be setup. This is ONLY meant to
# be used for the initial setup after a fresh installation!
#
if [ -x /sbin/unconfigured.sh ]
then
/sbin/unconfigured.sh
fi

#
# Source defaults.
#
. /etc/default/rcS
export VERBOSE

#
# Trap CTRL-C &c only in this shell so we can interrupt subprocesses.
#
trap ":" INT QUIT TSTP

#
# Call all parts in order.
#
for i in /etc/rc.d/rcS.d/S??*
do
# Ignore dangling symlinks for now.
[ ! -f "$i" ] && continue
case "$i" in
*.sh)
# Source shell script for speed.
(
trap - INT QUIT TSTP
set start
. $i
)
;;
*)
# No sh extension, so fork subprocess.
$i start
;;
esac
done

#
# Finish setup if needed. The comment above about
# /sbin/unconfigured.sh applies here as well!
#
if [ -x /sbin/setup.sh ]
then
/sbin/setup.sh
fi

-------------

script containing daemons (and daemons are , user_mgr, portmap,l2f_server)
--------------------------------------
</etc/rc.d/rcS.d/S20ibe-setup.sh>
-----------------------------------------

#!/bin/sh

PATH=/bin:/usr/bin:/sbin:/usr/sbin

echo "Remounting root file system as read-write ..."
mount -n -o remount,rw /

echo "mounting /proc"
mount /proc

echo "mounting /dev/pts"
mount /dev/pts

# Enter root, /proc into mtab.
mount -f /
mount -f /proc

echo "Creating Ram file systems ... "
/bin/mount -t ramfs none /ramfs
cd /ramfs
mkdir tmp var writables var/backups var/cache var/lib var/lib/misc var/local
var/lock var/log var/opt var/run var/spool var/state var/state/dhcp
cd /
# Change the permissions of the /tmp directory
chmod ugo+rwx,o+t /ramfs/tmp

busybox touch /var/state/dhcp/dhcpd.leases
busybox touch /var/state/dhcp/dhclient.leases

cat /dev/null > /ramfs/writables/ifstate
chmod u+rw /ramfs/writables/ifstate
echo "done"

echo "generating network/interfaces"
/etc/init.d/net-xlator

echo "bringing up the network"
/sbin/ifup -a

echo "generating application startup script"
/etc/init.d/ibe-appstartup

# start up user manager + portmap + web server
/sbin/portmap
/usr/bin/user_mgr &
/usr/bin/goahead &
# Start the telnet server standalone, i.e without xinetd
/usr/sbin/in.telnetd -debug 23 &

Start the l2f RPC server
if [ -f /usr/bin/l2f_server ]; then
/usr/bin/l2f_server &
fi


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:25    [W:0.041 / U:0.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site