Do you have a question? Post it now! No Registration Necessary
Subject
- Posted on
user application startup
- 11-18-2004

Re: user application startup

Not sure it's the *best* way, but I do things like this...
/etc/inittab
::sysinit:/etc/init.d/rcS
tty1::askfirst:/bin/login
tty2::askfirst:/bin/login
ttyS0::respawn:/sbin/getty -L ttyS0 9600
::ctrlaltdel:/sbin/swapoff -a
::ctrlaltdel:/bin/umount -a
/etc/init.d/rcS
#! /bin/sh
insmod doc.o
mount -a # Mount the default file systems mentioned in /etc/fstab
hostname rhobert
syslogd -m 30
klogd
/bin/hesc104 -k &
... the hesc104 is a user mode program
Mike

Re: user application startup

Add a script in /etc/init.d - with "start, stop, restart, optional reload"
entry points.
In Debian, you can use the /etc/init.d/skeleton as a template for this.
Make sure to set permissions 755. Then issue the following:
chmod 755 /etc/init.d/<program>
update-rc.d <program> defaults
You now have a well behaved application, which will start automatically
on boot and stop on system shutdown.
If you want to start your application manually /etc/init.d/<program> start.
Redhat has the same environment, the structure of the init.d/<program>
is a little different (same entry points).
--mikeb
Site Timeline
- » MTD concat HOW-TO?
- — Next thread in » Embedded Linux
-
- » CF Modem Cards
- — Previous thread in » Embedded Linux
-
- » Crosscompiling for ARM: reloc type R_ARM_ABS32 is not supported for PIC - ...
- — Newest thread in » Embedded Linux
-
- » Capacitors at RF
- — The site's Newest Thread. Posted in » Electronics Design
-
- » [MANIFESTO] it.hobby.elettronica
- — The site's Last Updated Thread. Posted in » Electronics Hobby (Italian)
-