Moxa V2401-CE [22/108] Setting the run level

Moxa V2401-LX [22/108] Setting the run level
V2401/2402 Series Linux User’s Manual Software Configuration
2-15
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).
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
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:
After you finish writing or modifying the code, remember to execute “umount /” to change the
root directory back to Read-only mode.
MOXA:~# mount -o remount,rw /dev/
s
d
a
1
/
MOXA:~# rm –f /etc/rc2.d/S60tcps2
MOXA:~#
u
mount /
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#

Содержание

Похожие устройства

Скачать