I would like to run a few daemons at startup, and my application. So,
I tried modifying the /linuxrc file (in my case /linuxrc-mtdroot. I
initially added ftpd, and it ran and worked fine, so I added the
syslogd and my application, myappd (yes, its a daemon too). Neither
syslogd nor myappd will run. Both run fine once from a prompt. What am
I doing wrong? Below is the
lnuxrc file. My comments (<-- ) in the below text were added in this
post, and do not appear in the real linuxrc file.
#!/bin/sh
# Copyright (c) 2006, Technologic Systems.
# All rights reserved.
#
# Roots to NAND flash chip, assumes /dev/mtdblock/3 YAFFS type filesystem
# Symlink to /linuxrc and run 'save' to use.
mount -t proc proc /proc
export CONSOLE=/dev/ttyAM0
insmod -q -f /ts7xxx_nand.o >/dev/null 2>&1
mount -t yaffs /dev/mtdblock/3 /mnt/root >/dev/null 2>&1
export BOOTTIME=`eptime`
cd /proc
if [ -e /mnt/root/fastboot -o ! -e /mnt/root/bin/mount ]; then
(
export ENV=/shinit
setcons
ifconfig eth0 192.168.0.50
cd /mnt/root
telnetd
ftpd <-- this runs
syslogd <-- this does not run
check-usb-update >/dev/null 2>&1 </dev/null &
myappd <-- and neither does this
exec sh -i
) <$CONSOLE >$CONSOLE 2>&1
killall busybox
fi
cd /mnt/root
(
stty -F $CONSOLE ospeed 115200 >/dev/null 2>&1
echo ">> Booting Linux..."
setcons
) >$CONSOLE <$CONSOLE 2>&1
insmod -q -f bootloader >/dev/null 2>&1
KCMD="console=`basename $CONSOLE`,115200 root=/dev/mtdblock/3"
bootload -c "$KCMD" /mnt/root/vmlinux.bin >/dev/null 2>&1
pivot_root . initrd
./bin/mount -n --move initrd/dev dev
./bin/mount -n --move initrd/proc proc
exec ./usr/sbin/chroot . ./sbin/init <.$CONSOLE >.$CONSOLE 2>&1
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|