Moxa V2401-CE [18/108] How to run the shell script automatically when the kernel boots up

Moxa V2401-LX [18/108] How to run the shell script automatically when the kernel boots up
V2401/2402 Series Linux User’s Manual Software Configuration
2-11
How to run the shell script automatically when the kernel boots up
Because the root file system is mounted in Read-only mode, we need to re-mount it using writable
permission.
# mount -o remount,rw /dev/sda1/
Copy the example shell script fixtime to directory /etc/init.d, and then use chmod 755 fixtime to
change the shell script mode.
# chmod 755 fixtime
Next, use vi editor to edit the file /etc/inittab.
# vi /etc/inittab
Add the following line to the bottom of the file:
ntp : 2345 : respawn : /etc/init.d/fixtime
After you finish writing or modifying the code, remember to execute “umount /” to change the
root directory back to Read-only mode.
# umount /
Use the command #init q to re-initialize the kernel.
# init q
Enabling and Disabling Daemons
The following daemons are enabled when the V2401/2402-LX boots up for the first time.
y snmpd SNMP Agent Daemon
y telnetd Telnet Server/Client Daemon
y inetd Internet Daemons
y ftpd FTP Server/Client Daemon
y sshd Secure Shell Server Daemon
y httpd Apache WWW Server Daemon

Содержание

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

Скачать