Dear All, I want to boot my application (Example yy2) automatically once the power is switched on without any user interface or without logging.
start my application
During bootup it would be /etc/rc.local or a startup script in /etc/init.d with links in the /etc/rc.d/rcX.d directories and only run during boot up or runlevel changes.
Thanks Jon can you please elaborate the procedure above u said with an example.... it will be great support if u help me.
I will have alook tonight when I have my board in front of me. What I said above was generic for Linux machines. It may be that its slightly different on the Mini2440.
Actually I tried to put my application in rc.local file and rebooted the board it booted normally but my application did not pop up??? I want to try by putting script file in /etc/init.d and link with /etc/rc2.d but I am confused what should be written in script file... please any one has ready script it will be great help to me.
Have you got an & at the end of the command line? Look in the factory distro /etc/init.d/rcS for an example and the last line when it boots up Qtopia.
thanks davef, yes but where exactly I should do modification can please give any ready available script. one thing where should I copy my a.out file in target(mini2440) board I mean i did it in /home
Dear Devef,
suppose I have following appache.sh file in /etc/init.d
now I want to modify this script file for my application for example yy
please will you tell me how to and where to modify in this file
#!/bin/bash
#
# apache-ssl Start the apache-ssl HTTP
#
# The variables below are NOT to be changnetd
# script more readable.
ll
NAME=apache-ssl
DAEMON=/usr/sbin/$NAME
PIDFILE=/var/run/$NAME.pid --exec $DAEMON > /dev/null
CONF=/etc/$NAME/httpd.conf
APACHECTL=/usr/sbin/${NAME}ctl
# note: SSD is required only at startup o
SSD=`which start-stop-daemon`
ENV="env -i LANG=C PATH=/bin:/usr/bin:/us
dfile $PIDFILE --signal HUP; then
trap "" 1 ILE --exec $DAEMON > /dev/null
# Check that we're not being started by i
if egrep -q -i "^[[:space:]]*ServerType[[
then
exit 0
|stop|reload|reload-modules|force-reloa
fi
est_config() {
if [ ! -x $APACHECTL ]; then
echo "$APACHECTL is not executable, exiting"
exit 0
fi
# ensure we don't leak environment vars into apachectl
APACHECTL="$ENV $APACHECTL"
if ! $APACHECTL configtest 2> /dev/null
then
printf "Configuration syntax error detected. Not reloading.\n\n"
$APACHECTL configtest
exit 1
fi
}
should_start() {
if [ ! -x $DAEMON ]; then
echo "apache-ssl is not executable, not starting"
exit 0
fi
case "$1" in
start)
should_start
test_config
echo -n "Starting web server: $NAME"
$ENV $SSD --start --pidfile $PIDFILE --exec $DAEMON > /dev/null
;;
stop)
echo -n "Stopping web server: $NAME"
start-stop-daemon --stop --pidfile $PIDFILE --oknodo
rm -rf /var/lib/apache/mod-bandwidth/link/*
;;
reload | force-reload)
test_config
echo -n "Reloading $NAME configuration"
start-stop-daemon --stop --pidfile $PIDFILE --signal USR1
;;
reload-modules)
test_config
echo -n "Reloading $NAME modules" IDFILE --oknodo --retry 30
start-stop-daemon --stop --pidfile $P
should_start --exec $DAEMON > /dev/null
$ENV $SSD --start --pidfile $PIDFILE
;;
restart)
test_config
echo -n "Restarting $NAME" dfile $PIDFILE --signal HUP; then
if ! start-stop-daemon -q --stop --piILE --exec $DAEMON > /dev/null
$ENV $SSD --start --pidfile $PIDF
fi
;;
*)
echo "Usage: /etc/init.d/$NAME
{start|stop|reload|reload-modules|force-reloa
d|restart}"
exit 1
;;
esac
if [ $? -eq 0 ]; then
echo .
exit 0
else
echo " failed"
exit 1
fi
Sorry, but you quickly exceeded my knowledge limits! To start Qtopia on the factory distro: /bin/Qtopia & Someone will have to help. Good luck!
You must add starting script to rcS. In script You must export all needed environment variables and then run application. best regards Tom
hi Tom i tried what you told me, on file rcS i put this line: /home/cherokee/sbin/./cherokee with this my webserver started automatic, but my system couldnt start. i saw the system's proccess by my host compute (by hyperterminal) and it seems that it started cherokee, but it didnt continue with the others proccess. what could i did wrong? i hope you can helpme, thanks alot !!


