DA-710 Series Linux
Software Configuration
2-9
Setting the Run-Level
To set the Linux run-level and execution priority of a program, use the following command (because the root
file system is mounted in Read-only mode, we need to re-mount it with write permission).
MOXA:~# mount -o remount,rw /dev/hda1 /
Edit a shell script to execute
/root/tcps2-release
and save to
tcps2
as an example.
#cd /etc/rc2.d
#ln –s /etc/root/tcps2 S60tcps2
or
#ln –s /etc/root/tcps2 k30tcps2
MOXA:~# cd /etc/rc2.d
MOXA:/etc/rc2.d#
MOXA:/etc/rc2.d# ls
S19nfs-common
S25nfs-user-server S99showreadyled
S20snmpd
S55ssh
S24pcmcia
S99rmnologin
MOXA:/etc/rc2.d#
MOXA:/etc/rc2.d# ln –s /root/tcps2-release S60tcps2
MOXA:/etc/rc2.d# ls
S19nfs-common
S25nfs-user-server S99rmnologin
S20snmpd
S55ssh
S99showreadyled
S24pcmcia
S60tcps2
MOXA:/etc/rc2.d#
The command
SxxRUNFILE
has the following meaning:
S:
Start the run file while Linux boots up.
xx:
A number between 00-99. The smaller number has a higher priority.
RUNFILE:
The script file name.
The command
KxxRUNFILE
has the following meaning:
K:
Start the run file while Linux shuts down or halts.
xx:
A number between 00-99. The smaller number has a higher priority.
RUNFILE:
The script file name.
To remove the daemon, remove the run file from /etc/rc2.d by using the following command:
MOXA:~# rm –f /etc/rc2.d/S60tcps2
After you finish writing or modifying the code, remember to execute “umount /” to change the root directory
back to Read-only mode.
MOXA:~# rm –f /etc/rc2.d/S60tcps2