DA-681 Linux
Software Configuration
2-8
# !/bin/sh
# Add the daemonyou want to run daemon
/root/tcps2-release &
5.
After you finish writing or modifying the code, remember to execute “umount /” to change the root directory
back to Read-only mode.
Moxa:~# umount /
6.
You should be able to find the enabled daemon after you reboot the system.
Moxa:~# ps -ef
UID
PID PPID
C STIME TTY
TIME CMD
root
1 0
0 Feb18 ?
00:00:01 init [2]
root
2 1
0 Feb18 ?
00:00:00 [migration/0]
root
3 1
0 Feb18 ?
00:00:00 [ksoftirqd_0]
root
4 1
0 Feb18 ?
00:00:00 [events/0]
root
5 1
0 Feb18 ?
00:00:00 [khelper]
root
6 1
0 Feb18 ?
00:00:00 [kthread]
root
9 6
0 Feb18 ?
00:00:00 [kblockd/0]
root
10 6
0 Feb18 ?
00:00:00 [kacpid]
root
107 6
0 Feb18 ?
00:00:00 [kseriod]
root
143 6
0 Feb18 ?
00:00:00 [pdflush]
root
144 6
0 Feb18 ?
00:00:00 [pdflush]
root
145 6
0 Feb18 ?
00:00:00 [kswapd0]
root
146 6
0 Feb18 ?
00:00:00 [aio/01]
root
622 6
0 Feb18 ?
00:00:00 [khubd]
root
763 6
0 Feb18 ?
00:00:00 [scsi_eh_0]
root
765 6
0 Feb18 ?
00:00:00 [usb-storage]
root
1119 1
0 Feb18 ?
00:00:00 udevd --daemon
root
1527 6
0 Feb18 ?
00:00:00 [kpsmoused]
root
1754 6
0 Feb18 ?
00:00:00 [kmirrord]
daemon 2094 1
0 Feb18 ?
00:00:00 /sbin/portmap
root
2311 1
0 Feb18 ?
00:00:00 /usr/sbin/acpid
-c /etc/acpi/evemts –s /var/run/acpid.socket
root
2318 1
0 Feb18 ?
00:00:00 /usr/sbin/inetd
root
2452 1
0 Feb18 ?
00:00:00 /root/tcps2-release
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. This program can be
found in Example Directory in CD-ROM.
#cd /etc/rc2.d
#ln –s /etc/root/tcps2 S60tcps2
or
#ln –s /etc/root/tcps2 k30tcps2