Clemens K�hnle wrote:
>
> Hello
>
> I'm using LEM Distribution an a small system.
> I want to run a special bash script after init has finished ( e.g.
> started from a rc script ).
> This script should then start my applications.
> The applications should start without any user input.
> ( embedded system without keyboard ... )
> I want to run the applications not by root!
>
> How can i run a bash script with a special user?
> The way i know is that i have to login with user and password.
> How can i avoid this?
>
> Thanks for any suggestions
> Clemens
take the agetty program from a normal Linux dist. and put the following
line into /etc/inittab
1:2345:respawn:/sbin/agetty -n -l /bin/autologon.sh 9600 tty1
where /bin/autologon.sh is your personal start script. This script is
#!/bin/sh
#/bin/autologon.sh
echo "autologon ..."
. /etc/profile
cd /
if test -f $AUTO_LOGON_SCRIPT ; then
# /bin/su -c $AUTO_LOGON_SCRIPT $AUTO_LOGON_USER
/bin/sh --login -c $AUTO_LOGON_SCRIPT
else
echo "could not find $AUTO_LOGON_SCRIPT -> starting shell"
/bin/sh --login
fi
if $AUTO_LOGON_SCRIPT is set it is executed with user $AUTO_LOGON_USER
Lothar
--
Lothar Werzinger Dipl.-Ing.Univ.
Dept. R&D (Abt. EW) Phone: +49-(0)9401/70-3499
KRONES AG Fax: +49-(0)9401/70-3679
B�hmerwaldstra�e 5 WWW: http://www.krones.de
D-93068 Neutraubling, Germany eMail: mailto:[EMAIL PROTECTED]
--
To unsubscribe from this list, send a message to [EMAIL PROTECTED]
with the command "unsubscribe linux-embedded" in the message body.
For more information, see <http://waste.org/mail/linux-embedded>.