TC-6110 Linux User’s Manual First Edition, September 2013 www.moxa.com/product © 2013 Moxa Inc. All rights reserved.
TC-6110 Linux User’s Manual The software described in this manual is furnished under a license agreement and may be used only in accordance with the terms of that agreement. Copyright Notice © 2013 Moxa Inc. All rights reserved. Trademarks The MOXA logo is a registered trademark of Moxa Inc. All other trademarks or registered marks in this manual belong to their respective manufacturers.
Table of Contents 1. Introduction ...................................................................................................................................... 1-1 Overview ........................................................................................................................................... 1-2 Software Specifications........................................................................................................................ 1-2 Software Components .................
Overview .................................................................................................................................... 4-2 Installing the Predictive Maintenance Diagnostic Tool ....................................................................... 4-2 Moxa Rcore Predictive Maintenance Diagnostic Tool ......................................................................... 4-2 The T-sensor Log ...........................................................................................
1 1. Introduction Thank you for purchasing the Moxa TC-6110 series of ready-to-run x86 embedded computers. This manual introduces the software configuration and management of the TC-6110-LX, which runs the Linux operating system. For hardware installation, connector interfaces, setup, and upgrading the BIOS, please refer to the TC-6110 Hardware Manual. Linux is an open, scalable operating system that allows you to build a wide range of innovative, small footprint devices.
TC-6110 Linux User's Manual Introduction Overview TC-6110 train computers are designed specifically for car-borne train applications like network video recorders, passenger information systems, condition monitoring, and train-to-ground communications. The computers come with two gigabit LAN ports, one RS-232 serial port, three USB 2.0 ports, and two TC-SATA-T storage modules, giving customers a versatile solution applicable to a variety of on-board train computing needs.
2 2. Basic Platform Configuration In this chapter, we explain how to configure a TC-6110-LX computer. There are two ways to do this: 1) Connecting to the TC-6110-LX computer directly, with keyboard/monitor for input/output, or 2) Connecting remotely, over a network, using an SSH console from another Windows or Linux machine. This chapter describes basic Linux operating system configurations. Advanced network management and configuration instructions will be described in chapter 3, Managing Communications.
TC-6110 Linux User's Manual Basic Platform Configuration Default User Account and Password To provide stronger system security, Moxa has disabled the root account. When shipped, the TC-6110-LX only provides a single user account: moxa (in lowercase). The default login and password are moxa/moxa. Login: moxa Password: moxa For improved security, the TC-6110-LX computer will force the administrator to change the system password immediately after the first login.
TC-6110 Linux User's Manual Basic Platform Configuration moxa@MOXA:~# sudo ifconfig eth0 192.168.100.100 After issuing this command, you will be prompted for the password of the user account currently used to log in to the system. This will allow the command to be executed with root privileges. moxa@Moxa:~# sudo ifconfig eth0 192.168.100.100 [sudo] password for moxa: moxa@MOXA:~# sudo ifconfig eth0 [sudo] password for moxa: eth0 Link encap:Ethernet HWaddr 00:90:e8:00:df:fe inet addr:192.168.100.
TC-6110 Linux User's Manual Basic Platform Configuration Connecting from an SSH Console To offer users a strongly secure remote login console, the TC-6110-LX comes with secure shell remote access (SSH) already enabled. SSH is a much more secure alternative to the now deprecated Telnet. Default IP addresses and netmasks for the network interfaces are: Default IP Address Netmask LAN 1 192.168.3.127 255.255.255.0 LAN 2 192.168.4.127 255.255.255.
TC-6110 Linux User's Manual Basic Platform Configuration user@remoteDebian-moxa@Moxa:~# ssh 192.168.3.127 The authenticity of host ‘192.168.3.127 (192.168.3.127)’ can’t be established. RSA key fingerprint is 8b:ee:ff:84:41:25:fc:cd:2a:f2:92:8f:cb:1f:6b:2f. When asked if you want to continue connecting over SSH, answer yes by typing Y, y, or yes.
TC-6110 Linux User's Manual Basic Platform Configuration Sample shell script for scheduled clock synchronizations You may save this shell script using any file name, but it should be saved in the /etc/init.d directory. For example, /etc/init.d/fixtime.sh. #!/bin/sh ntpdate time.stdtime.gov.tw # You can use the time server’s ip address or domain # name directly. If you use domain name, you must # enable the domain client on the system by updating # /etc/resolv.conf file.
TC-6110 Linux User's Manual Basic Platform Configuration moxa@MOXA:~# sudo hwclock –w moxa@MOXA:~# date ; sudo hwclock Wed Dec 16 16:36:12 CST 2009 Wed 16 Dec 2009 03:38:13 AM CST -0.016751 seconds Setting the RTC After setting the system time, use hwclock to write the current system time to the RTC, as follows: Moxa~# hwclock –w Enabling and Disabling Daemons To run a custom daemon (i.e.
TC-6110 Linux User's Manual Basic Platform Configuration Managing Services with insserv Linux services can be started or stopped using of the scripts in /etc/init.d/. If you want to start up some service, you can use insserv to add or remove the service to a specific run level. This tutorial shows you how to add or remove a service from a specified run level. WARNING Insserve is a low level tool, and when improperly called can result in an unbootable system.
TC-6110 Linux User's Manual Basic Platform Configuration Check to make sure the script has been removed. moxa@MOXA:~#ls -l /etc/rc?.d/*tcps* ls: cannot access /etc/rc?.d/*tcps*: No such file or directory Cron for Executing Scheduled Commands The cron daemon reads /etc/crontab to retrieve scripts and other commands to be run at regularly scheduled times. Cron wakes up every minute and checks each command listed in the crontab file to see if it should be run at that time.
TC-6110 Linux User's Manual Basic Platform Configuration Disconnecting a USB Storage Device Remember to type the command moxa@Moxa:~# sync before you disconnect a USB block storage device. If you do not issue the command, you may lose data. ATTENTION Remember to exit the directory you are working in before disconnecting the USB storage device. If you do not first exit the directory, the automated unmount process will fail, possibly corrupting system processes.
TC-6110 Linux User's Manual Basic Platform Configuration ATTENTION The APT cache space /var/cache/apt is located in tmpfs. If you need to install a huge package, link /var/cache/apt to USB mass storage or mount it to an NFS space to generate more free space. If you worry about the available space during a package installation, use the command moxa@Moxa:~# df –h to check how much free space is available for tmpfs.
3 3. Managing Communications The TC-6110-LX ready-to-run embedded computer is a network-centric platform designed to serve as a front-end for data acquisition and industrial control applications. This chapter describes how to configure the various communication functions supported by the Linux operating system.
TC-6110 Linux User's Manual Managing Communications Configuring Network Interfaces Configuring a Persistent Network Interface Naming Order Debian Linux systems use the udev daemon to detect and enable new network interfaces and to manage the device files that are created for them. Udev must be configured with rules that enforce a persistent interface naming order.
TC-6110 Linux User's Manual Managing Communications Ethernet Interface Configuration The TC-6110-LX computer has two 10/100/1000 Ethernet ports named LAN1 and LAN2. The default IP addresses and netmasks of these network interfaces are: Default IP Address Netmask LAN1 192.168.3.127 255.255.255.0 LAN2 192.168.4.127 255.255.255.
TC-6110 Linux User's Manual Managing Communications Adjusting IP Addresses with ifconfig IP settings can be adjusted during run-time, but the new settings will not be saved to the flash ROM without modifying the file /etc/network/interfaces. For example, the following command changes the IP address of LAN1 to 192.168.1.1. moxa@MOXA:~# sudo ifconfig eth0 192.168.1.
TC-6110 Linux User's Manual Managing Communications Noauth indicates that the peer does not need to authenticate itself. Nodetach indicates that the connection will not detach from the controlling terminal. Without this option, if a serial device other than the terminal on the standard input is specified, pppd will fork to become a background process. After choosing whether or not to use noauth and nodetach, the pppoeconf will next ask you for your username and password.
TC-6110 Linux User's Manual Managing Communications The Difficult Way (Manually) You may wish or need to connect to your PPPoE provider by manually configuring a connection. Here is how.Use the following procedure to configure PPPoE: 3. 1. Connect the TC-6110-LX’s LAN port to an ADSL modem (you may use a cable, HUB, or switch). 2. Log in to the TC-6110-LX as the root user. Edit the file /etc/ppp/pap-secrets and add the following entry in the place indicated below: “username@YourProvider.
TC-6110 Linux User's Manual Managing Communications Type your username (the one you set in the /etc/ppp/pap-secrets and /etc/ppp/chap-secrets files) after the name option. You may add other options as needed. 6. Set up DNS. If you are using DNS servers supplied by your ISP, edit the file /etc/resolv.conf by adding the following lines of code: nameserver ip_addr_of_first_dns_server nameserver ip_addr_of_second_dns_server For example: nameserver 168.95.1.1 nameserver 139.175.10.
TC-6110 Linux User's Manual Managing Communications The following is an AT command used to connect to a PPP server by modem. Use this command for old ppp servers that prompt for a login name (replace username with the correct name) and password (replace password with the correct password). Note that debug crtscts and defaultroute 192.XXX.XX.XXX are optional.
TC-6110 Linux User's Manual Managing Communications moxa@Moxa:~# pppd connect ‘chat –v” “ “ “ ‘ user root password root \ noipdefault /dev/ttyM0 19200 crtscts Checking the Connection Once you have set up a PPP connection, there are some steps you can take to test the connection. First, type: moxa@Moxa:~# ifconfig After executing the command, you should be able to see all of the available network interfaces. ppp0 should be one of the network interfaces.
TC-6110 Linux User's Manual Managing Communications Setting up a Machine for Incoming PPP Connections Method 1: pppd dial-in with pppd commands This first example applies to using a modem, and requiring authorization with a username and password. #pppd /dev/ttyM0 115200 crtscts modem 192.168.16.1:192.168.16.2 login auth You should also add the following line to the file /etc/ppp/pap-secrets: * * ““ * The first star (*) lets everyone login. The second star (*) lets every host connect.
TC-6110 Linux User's Manual Managing Communications ATTENTION If you would like to have auto dial-in service, you can launch the dial-in service in /etc/inittab with the respawn command: moxa@MOXA:~# sudo echo “p0:2345:respawn:pppd call dialin” >> /etc/inittab Telnet/FTP/TFTP Server For security reasons, the TC-6110-LX only supports SSH and SFTP. The Telenet, FTP, and TFTP are installed, but have been disabled.
TC-6110 Linux User's Manual Managing Communications the hostname, which can only contain the ascii characters a through z, the numbers 0 through 9, and a hyphen. Hostnames must not include dots (periods), because the hostname is used as part of a fully qualified URL. 1. To change the hostname, use the following command: moxa@MOXA:~# sudo echo ”your-preferred-hostname” > /etc/hostname 2. Load the new hostname: moxa@MOXA:~# sudo /etc/init.d/hostname.sh start 3. Check the new hostname.
TC-6110 Linux User's Manual Managing Communications hosts: networks: files dns files protocols: services: ethers: rpc: db db db db netgroup: nis files files files files Apache Web Server The Apache config directory houses four basic directories: sites-enabled, mods-enabled, sites-available, and mods-available. The sites-enabled directory is where active websites are enabled; this is done by creating a symlink into the sites-available directory.
TC-6110 Linux User's Manual Managing Communications Disabling CGI Support for CGI scripting is enabled by default. To disable it, follow the steps below. 1.
TC-6110 Linux User's Manual Managing Communications 5. If you have CGI scripts, you must now also change the same file so that the CGI entries point to the files on the USB device. Change your basic Apache configuration file so that it matches the lines shown in red, below: ScriptAlias /cgi-bin/ /media/usb0/www/cgi-bin/ AllowOverride None Options ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all 6.
TC-6110 Linux User's Manual Managing Communications In Netfilter, a few fundamental rule tables are pre-defined, with each table containing built-in chains and user-defined chains. Tables form the highest layer of organization for Netfilter’s rule sets, and rule chains form the middle layer, by which individual rules are ordered. Each chain is a list of rules that are applied (or not) to a packets as they traverse the chains. Each rule specifies what to do with a matching packet.
TC-6110 Linux User's Manual Managing Communications When the NAT table alters the destination address (on inbound packets, in the PREROUTING chain), it is called Destination Network Address Translation (DNAT), or Port Forwarding. When the NAT table alters the source address (on outbound packets, in the POSTROUTING chain), it is called Source Network Address Translation (SNAT), or IP Masquerading.
TC-6110 Linux User's Manual Managing Communications 4. The OUTPUT chain receives all outbound packets which are addressed to computers outside the local intranet. All packets which are addressed to the local intranet served by the firewall will be filtered here, before they continue outwards, onto the Internet. 5. The POSTROUTING chain is the very last chain that is applied; all outbound packets which are leaving the local machine (or subnet) will pass through this chain.
TC-6110 Linux User's Manual Managing Communications Netfilter Hierarchy for Incoming Packets This figure shows how packets traverse the table hierarchy. Outbound packets originating on the local network start at the box labeled Local Process. Inbound packets start at the top box labeled Incoming Packets.
TC-6110 Linux User's Manual Managing Communications Connection Tracking A connection tracking system does not filter packets. The Netfilter connection tracking system monitors kernel memory structures to keep track of the state of each connection; this means that it logs the protocol types, port number pairs, and source and destination IP addresses, and associates that with various connection states and timeout values.
TC-6110 Linux User's Manual Managing Communications INPUT, OUTPUT, FORWARD, PREROUTING, OUTPUT, and POSTROUTING. Possible policies that may be enforced on these chains are ACCEPT, DROP, QUEUE, and RETURN (see below for explanation). INPUT: Targets packets coming into the TC-6110-LX over the filter, mangle, or security tables. OUTPUT: Targets locally-generated packets leaving the TC-6110-LX. All tables have an output chain.
TC-6110 Linux User's Manual Managing Communications List current rule chains for a target table, or for all tables The full command for listing rule chains is as follows: MOXA:~# iptables [-t table, or multiple, tables,…] [-L chain] [-n] Command Arguments: -t: Table to manipulate (default: ‘filter’); available args are filter, nat, mangle, raw, and security -L: Indicates a chain to be listed. If no chain is selected, all chains are listed. -n: Returns the numeric output of addresses and ports: e.g.
TC-6110 Linux User's Manual Managing Communications There must be no references to the chain in other chains or tables, and the chain must be empty, i.e. not contain any rules. You must delete or replace any remaining referring rules before the chain can be deleted. If no argument is given, this will attempt to delete every user defined chain in the table. Writing Rulechains In this section we show you how to write rules for a simple industrial network firewall.
TC-6110 Linux User's Manual Managing Communications ATTENTION ICMPv6 Neighbor Discovery packets will always be classified INVALID (if you don’t know what this means, you can probably ignore it). You may accept them with this rule: # iptables -A INPUT -p 41 -j ACCEPT Example 1: Accept TCP packets from 192.168.0.1. # iptables –A INPUT –i eth0 –p tcp –s 192.168.0.1 –j ACCEPT Example 2: Accept TCP packets from Class C network 192.168.1.0/24. # iptables –A INPUT –i eth0 –p tcp –s 192.168.1.
TC-6110 Linux User's Manual Managing Communications Saving the Firewall You must your firewall so that it will reload on the next reboot; otherwise, the rules witll be flushed and the firewall permanently deleted.
TC-6110 Linux User's Manual Managing Communications ATTENTION To make a module load across reboots, you may add it to the /etc/modprobe.conf file using this command: moxa@MOXA:~# echo “ipt_MASQUERADE” >> /etc/modprobe.conf Don’t forget to backup your modprobe.conf file before altering it, and take care to use the double pointer (>>)—which is append—rather the single pointer (>) which is overwrite.
TC-6110 Linux User's Manual Managing Communications On each OpenVPN machine, you should carry out configurations in the /etc/openvpn directory, where script files and key files reside. Once established, all operations will be performed in that directory. Ethernet Bridges Linking Indepdent Subnets Over the Internet This setup will link at two independent subnets over the Internet. It will use at least four machines, as shown in the following diagram.
TC-6110 Linux User's Manual Managing Communications cipher DES-EDE3-CBC auth MD5 tun-mtu 1500 tun-mtu-extra 64 ping 40 up /etc/openvpn/tap0-br.sh #comp-lzo 2. Next, modify the routing table in /etc/openvpn/tap0-br.sh script.so that it maps the internal subnet VPN server A will be serving. #--------------------------Start--------------------------#!/bin/sh # value after “-net” is the subnet behind the remote peer route add -net 192.168.4.0 netmask 255.255.255.
TC-6110 Linux User's Manual Managing Communications route add -net 192.168.2.0 netmask 255.255.255.0 dev br0 #---------------------------------- end ----------------------------7. And then configure the bridge interface script in /etc/openvpn/bridge. #!/bin/bash # Create global variables # Define Bridge Interface br=“br0” # Define list of TAP interfaces to be bridged, # for example tap=“tap0 tap1 tap2”. tap=“tap0” # Define physical ethernet interface to be bridged # with TAP interface(s) above.
TC-6110 Linux User's Manual Managing Communications Ethernet Bridging for Private Networks on the Same Subnet Like the last example, this setup will link two subnets across the oopen Ethernet; however, these two subnets will share addressing as if they were located on the same local subnet. All of the clients on the two remote subnets are configured for a range of IP addresses that spans the same subnet.
TC-6110 Linux User's Manual 2. Managing Communications On VPN server A (OpenVPN A), modify the remote address entry in the configuration file /etc/openvpn/tun.conf by adding the address of OpenVPN B. Also, you must add an ifconfig entry which indicates the local (1st) and remote (2nd) VPN gateway addresses, separated by a space. # point to the peer remote 192.168.8.174 dev tun secret /etc/openvpn/secrouter.key cipher DES-EDE3-CBC auth MD5 tun-mtu 1500 tun-mtu-extra 64 ping 40 ifconfig 192.168.2.
TC-6110 Linux User's Manual Managing Communications ifconfig 192.168.4.174 192.168.2.173 up /etc/openvpn/tun.sh 5. Next, change OpenVPN B’s routing table in the file /etc/openvpn/tun.sh so that it matches the local subnet the VPN gateway is serving. Notice the gw $5 appended to the end of this line: the $5 is a variable argument that OpenVPN passes to the script file. Its value is the second argument of ifconfig in the /etc/openvpn/tun.conf file.
TC-6110 Linux User's Manual Managing Communications -l [FACILITY_LEVEL]: the facility level is used to specify what type of program is logging the message. • This enables rsyslog to handle messages from different facilities (e.g., FTP, UUCP, cron, etc.) in different ways. • -v: run in verbose mode • -h: show command help / print command arguments The following example shows how to use the –v option to modify /etc/init.d/mxhtspd.sh: … start) echo "Starting mxhtspd daemon...
TC-6110 Linux User's Manual Managing Communications devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000) none on /tmp type tmpfs (rw,relatime) /dev/hda2 on /home type ext2 (rw,relatime,errors=continue) /dev/sda1 on /media/disk2p1 type ext3 (rw,relatime,errors=continue,data=ordered) /dev/sda2 on /media/disk2p2 type ext3 (rw,relatime,errors=continue,data=ordered) /dev/sdb1 on /media/disk1p1 type ext3 (rw,relatime,errors=continue,data=ordered) /dev/sdb2 on /media/disk1p2 typ
TC-6110 Linux User's Manual Managing Communications # The default runlevel. id:2:initdefault: 3. Enable rsyslogd at startup by editing the symlink located in the appropriate runlevel control directoriy (here, we are using the default runlevel 2): Moxa:/etc/rc2.d# mv N10rsyslog S10rsyslog 4. You may set syslog to report mxhtspd as a specialized facility level, but the POSIX standard suggests you set it to be recognized as a daemon.
TC-6110 Linux User's Manual Managing Communications log_application script before the disk is umounted. The command pidof returns the process i.d. of the program referenced in the argument position. #!/bin/sh file=`basename $0` num=$1 #Add your commands here kill -9 `pidof -x log_application` #Internal operation mxhtspd-remove-disk $num Setting Up GPS The National Marine Electronics Association (NMEA) has developed a specification for a communications interface that links marine electronic equipment.
TC-6110 Linux User's Manual Managing Communications moxa@Moxa:~# dpkg-reconfigure gpsd If necessary, you may edit the gpsd configuration file by hand; the file is located at /etc/default/gpsd. However, Debian recommends against this, and there is the possibility that whenever the gpsd package is updated you will lose your settings. If possible, use the dpkg-reconfigure command shown above. 4. After gpsd is configured, start the daemon: moxa@Moxa:~# sudo /etc/init.d/gpsd start 5.
TC-6110 Linux User's Manual NOTE Managing Communications Use the GNU system manual command to get more information on the GPS daemon interface and client: moxa@Moxa:~# man gpsd moxa@Moxa:~# man cgps Or visit the GPS project website for more information: http://gpsd.berlios.
4 4. Moxa’s Rcore Software Packages This chapters describes Moxa’s software packages that can be used on the TC-6110-LX computers.
TC-6110 Linux User's Manual Moxa’s Rcore Software Packages Moxa Predictive Maintenance Diagnostic Tool Overview The TC-6110 computers provide Moxa predictive maintenance diagnostic tool for you to monitor the system status of your disk drive. This package includes two tools: the G-Sensor chart tool and monitoring tool.
TC-6110 Linux User's Manual Moxa’s Rcore Software Packages The T-sensor Log The configuration file for the temperature sensor log files is /etc/mxsensor.conf. The temperature sensor logs may be configured for temperature scale (Celsius or Fahrenheit) and log mechanics (on/off, file path, logging interval, and max. file size). 1. The temperature sensor configuration file is the same as the accelerometer configuration file: mxsensor.conf.
TC-6110 Linux User's Manual Moxa’s Rcore Software Packages 1. The temperature sensor configuration file is the same as the accelerometer configuration file: mxsensor.conf. In the screenshot below you see the portion of the configuration file relevant to the temperature sensor. Edit this to configure how the temperature sensor will be logged. moxa@Moxa:~# sudo vi /etc/mx_sensor.conf. 2. Save the file and exit your editor (in VI, that is done by typing :wq). 3.
TC-6110 Linux User's Manual Moxa’s Rcore Software Packages Moxa SynMap Package Overview SynMap is Moxa’s revolutionary software virtualization, an evolutionary advance in network device control that adapts solid, reliable SNMP into a fully portable remote procedure interface. SynMap allows engineers to automate remote processes using SNMP object identifiers (OIDs) rather than device-specific addresses, making a scripted SynMap procedure fully interoperable with any other SynMap device.
TC-6110 Linux User's Manual Moxa’s Rcore Software Packages time to date, since the beginning of time systemMemorySize .1.3.6.1.4.1.8691.17.1.2.3.1.0 read-only The total amount of physical main memory systemVolumeCount .1.3.6.1.4.1.8691.17.1.2.3.2.0 read-only systemVolumeIndex .1.3.6.1.4.1.8691.17.1.2.3.3.1.1 read-only systemVolumeName .1.3.6.1.4.1.8691.17.1.2.3.3.1.2 read-only Returns a volumen name systemVolumeLabel .1.3.6.1.4.1.8691.17.1.2.3.3.1.
TC-6110 Linux User's Manual Moxa’s Rcore Software Packages USB ports, regardless of their current state in the usb general port table usbDeviceIndex .1.3.6.1.4.1.8691.17.1.6.4.1.3.1 read-only .1 The index is identical to usbPortIndex for the correspondent USB port usbDeviceVendorID .1.3.6.1.4.1.8691.17.1.6.4.1.3.1 read-only .2 The hexadecimal vendor string of the connected USB device as it is provided to the USB host usbDeviceProductID .1.3.6.1.4.1.8691.17.1.6.4.1.3.1 read-only .
TC-6110 Linux User's Manual Moxa’s Rcore Software Packages Using Moxa Synmap OIDs: snmpwalk & snmpget 1. The command snmpwalk uses SNMP GETNEXT requests to query a network or device for the entire OID tree. An OID may be given on the command linke; this OID specifies which portion of the OID tree will be searched. All variables in the subtree below the given OID are then queried and their values presented to the user. In this example, we walk the OID space beginning with the first OID in the Moxa MIB, 1.
TC-6110 Linux User's Manual Moxa’s Rcore Software Packages ATTENTION If you modified PLED status via command echo 1111 > /dev/pled, the SNMP database wont be synched Checking T-sensor The following table shows the OIDS of the temperature sensors, read/write option and available values. Item Name OID File Access tempSensorsIndex .1.3.6.1.4.1.8691.17.1.5.1.1.1.1 read-only tempSensorsDevice .1.3.6.1.4.1.8691.17.1.5.1.1.1.2 read-only tempSensorsValue .1.3.6.1.4.1.8691.17.1.5.1.1.1.3 read-only 1.
TC-6110 Linux User's Manual Moxa’s Rcore Software Packages Enabling the Watchdog There are two watchdog parameters that may be configured: the watchdogPeriod and the watchdogStatus. The watchdog period is an integer between 0 and 255, with each number representing a single second. Watchdog status indicates and/or sets the watchdog to enabled or disabled (if disabled, the watchdog period will be represented as a zero [0]). The default value of the watchdogPeriod is 60 (i.e.
5 5.
TC-6110 Linux User's Manual Programming Guide Desktop Management Interface (DMI) Product information may be read using Debian Linux’s Desktop Management Interface (DMI), dmidecode, as with the following commands: moxa@MOXA:~# sudo dmidecode -s "baseboard-manufacturer" MOXA moxa@MOXA:~# sudo dmidecode -s "baseboard-serial-number" TACCA1000000 Other keywords to retrieve DMI information are listed below: bios-vendor bios-version bios-release-date system-manufacturer system-product-name system-version syste
TC-6110 Linux User's Manual Programming Guide SATA LEDs may be accessed directly using the /dev/sata_pledX device node. The examples below show you how. Turning On or Off the LEDs To turn on the first LED and turn off the second, third and fourth LED. You should. moxa@Moxa:~# echo 1000 > /dev/pled To turn off all the LED you should. moxa@Moxa:~# echo 0000 > /dev/sata_pled1 To turn on the second LED and turn off the others.
TC-6110 Linux User's Manual Programming Guide -> ../init.d/watchdog lrwxrwxrwx 1 root root 18 Jul 16 11:23 /etc/rc6.d/K01watchdog -> ../init.d/watchdog The watchdog configuration file is /etc/watchdog.conf. By defauilt, the watchdog daemon is configured to signal the watchdog every 60 seconds.
TC-6110 Linux User's Manual Programming Guide IOCTL WDIOC_GETTIMEOUT Description Gets the current watchdog timeout. Input None Output arg: 1 ~ 255 seconds Return On success, return 0. Otherwise, return < 0 value. Examples This sample watchdog script, watchdog-simple.c, checks the watchdog every in 10 seconds. #include #include #include #include
TC-6110 Linux User's Manual Programming Guide /media/diskxpx Returns None int mxhtsp_is_button_pressed (int fd, int btn_num) Description Checks if a button is pressed. Parameters fd: Returns 1: pressed 0: not pressed -1: fail the open port btn_num: the button number int mxhtsp_is_disk_busy (int fd, int disk_num) Description Checks if a disk is busy.
TC-6110 Linux User's Manual Programming Guide Function Documentation int mx_accelerometer_read (GSENSOR_DATA *axis, unsigned char sensor_address) Description Reads G sensor data from accelerometer Parameters axis: the 3-axis data structure Returns 0: success -1: fail sensor_address: the accelerometer i2c address int mx_accelerometer_get_state(unsigned char sensor_addr, unsigned char reg_addr) Description Gets register value from specific accelerometer Parameters sensor_address: the i2c addres
TC-6110 Linux User's Manual #define #define #define #define #define #define DATA_RATE_REG POWER_CTL DATA_FORMAT_REG MEASURE_BIT DATA_RATE DATA_FORMAT Programming Guide 0x2C 0x2D 0x31 0x08 0x0a 0x0b int main(void) { GSENSOR_DATA axis; int ret; mx_accelerometer_set_state(I2C_GSENSOR1_ADDR, POWER_CTL, MEASURE_BIT); mx_accelerometer_set_state(I2C_GSENSOR2_ADDR, POWER_CTL, MEASURE_BIT); mx_accelerometer_set_state(I2C_GSENSOR1_ADDR, DATA_RATE_REG, DATA_RATE); mx_accelerometer_set_state(I2C_GSENSOR2_ADDR, DATA_
6 5. System Recovery The TC-6110 ready-to-run embedded computers are a Windows Embedded Standard 7 platform. This chapter describes the recovery process in the event of system instability.
TC-6110 Linux User's Manual System Recovery Overview: Setting Up the Recovery Environment A DA-682A computer, a 4 GB (min.) USB drive, and a copy of the recovery suite are all required to set up the DA-682A’s system recovery environment. The recovery procedure itself requires only a DA-682A computer and a bootable USB drive. The following steps describe the basic process of setting up the system recovery environment: 1.
TC-6110 Linux User's Manual System Recovery 5. Set the Device Type (lower left-hand corner) as USB Drive, then set the Drive dialog to the letter under which the USB is currently mounted. 6. Click OK, and the Clonezilla recovery environment (plus bootloader) will be copied to your USB drive. Two Types of Recovery: Base Install, and Fully Configured Because of the naming conventions used, for any given computer only a single system image may be stored on any given USB drive.
TC-6110 Linux User's Manual System Recovery ATTENTION You must manually delete the EFI directory on the USB. Step 2 (opt.): Recovering to a Stock OS The instructions which follow describe how to set up the recovery environment that will restore the operating system to a pristine post-install state. If you have installed any software on your system, then following these directions will result in all custom applications and code being wiped from the operating system.
TC-6110 Linux User's Manual System Recovery 5. Use the arrows to highlight USB and then use the plus/minus signs (+ -) to move it to the first boot priority position. Warning: Incorrectly configuring the boot priority will lead to recovery failure. 6. Press F10 and then press Enter to save and exit the BIOS configuration interface. This should initiate the next reboot, and your system should now boot from the USB drive. Step 4 (opt.
TC-6110 Linux User's Manual System Recovery 3. Once the image creation environment has completed booting up, you will be given a warning and asked if you wish to continue. Please keep in mind that if you create the recovery image, then any residual files currently copied to the /home/partimag directory will be deleted. If there are any files remaining in the USB partition image directory and you wish to save them, you must exit the recovery environment and copy these files to another disk.
TC-6110 Linux User's Manual System Recovery 5. At this point you may choose to power down the computer (press 0), reboot (press 1), enter a console terminal (access a console TTY -- press 2), or re-initiate the entire procedure (press 3). Do not remove the USB drive until you have rebooted or powered down the system. 6. Once you have powered down the system and removed the USB drive, you have finished configuring the recovery environment.
TC-6110 Linux User's Manual System Recovery 5. At this point, the system will remind you that you are about to overwrite your entire operating system with a new drive image, and ask you if you want to continue. When prompted, enter Y (case insensitive) from the keyboard to start the system restoration process. Any other letter or Ctrl-C will cancel it and exit Clonezilla. 6.
TC-6110 Linux User's Manual System Recovery 9. After the computer has powered down, remove the USB drive and store it in a safe place. Step 6: Reset the BIOS to its Original State Now you will need to return the boot priority to its original configuration so that the system will boot from the original disk.
TC-6110 Linux User's Manual System Recovery 5. Use the up/down arrows to highlight Hard Disk Drive and then use the plus/minus signs (+ -) to move it to the first boot priority position 7. Press F10 and then press Enter to save and exit the BIOS configuration interface. This should initiate the next reboot, and your system should now boot from the USB drive.
A A. Software Components Package Version Description acpi 1.6-1 Displays information on ACPI devices acpi-support-base 0.140-5 Scripts for handling base ACPI events such as the acpid 1:2.0.16-1+deb7u1 adduser 3.113+nmu3 Add and remove users and groups apache2 2.2.22-13 Apache HTTP Server metapackage apache2-mpm-prefork 2.2.22-13 Apache HTTP Server - traditional non-threaded power button Advanced Configuration and Power Interface event daemon model apache2-utils 2.2.
TC-6110 Linux User's Manual Software Components cpp-4.7 4.7.2-5 GNU C preprocessor cron 3.0pl1-124 Process scheduling daemon dash 0.5.7-3 POSIX-compliant shell db5.1-util 5.1.29-5 Berkeley v5.1 Database Utilities dc 1.06.95-2+b1 The GNU dc arbitrary precision reverse-polish calculator debconf 1.5.49 Debian configuration management system debconf-i18n 1.5.49 Full internationalization support for debconf debian-archive-keyring 2012.
TC-6110 Linux User's Manual Software Components gzip 1.5-1.1 GNU compression utilities hdparm 9.39-1+b1 Tune hard disk parameters for high performance host 1:9.8.4.dfsg.P1-6+nmu Transitional package 2 hostname 3.11 Utility to set/show the host name or domain name iamerican 3.3.02-6 American English dictionary for ispell (standard ibritish 3.3.02-6 version) British English dictionary for ispell (standard version) ienglish-common 3.3.
TC-6110 Linux User's Manual Software Components libasprintf0c2: i386 0.18.1.1-9 GNU library to use fprintf and friends in C++ libattr1: i386 1:2.4.46-8 Extended attribute shared library libbind9-80 1:9.8.4.dfsg.P1-6+nmu BIND9 Shared Library used by BIND 2 libblkid1: i386 2.20.1-5.3 Block device id library libboost-iostreams1.49.0 1.49.0-3.2 Boost.Iostreams Library libbsd0: i386 0.4.2-1 Utility functions from BSD systems - shared library libbz2-1.0: i386 1.0.
TC-6110 Linux User's Manual libisc84 Software Components 1:9.8.4.dfsg.P1-6+nmu ISC Shared Library used by BIND 2 libisccc80 1:9.8.4.dfsg.P1-6+nmu Command Channel Library used by BIND 2 libisccfg82 1:9.8.4.dfsg.P1-6+nmu Configures File Handling Library used by BIND 2 libitm1: i386 4.7.2-5 GNU Transactional Memory Library libiw30: i386 30~pre9-8 Wireless tools - library libk5crypto3: i386 1.10.1+dfsg-5+deb7u1 MIT Kerberos runtime libraries - Crypto Library libkeyutils1: i386 1.5.
TC-6110 Linux User's Manual Software Components libpipeline1: i386 1.2.1-1 Pipeline manipulation library libpkcs11-helper1: i386 1.09-1 Library that simplifies the interaction with libpopt0: i386 1.16-7 Libary for parsing cmdline parameters libprocps0: i386 1:3.3.3-3 Library for accessing process information from PKCS#11 /proc libpth20 2.0.7-16 The GNU Portable Threads libpython2.7 2.7.3-6 Shared Python runtime library (version 2.7) libqdbm14 1.8.
TC-6110 Linux User's Manual Software Components libx86-1: i386 1.1+ds1-10 x86 real-mode library libxapian22 1.2.12-2 Search engine library libxau6: i386 1:1.0.7-1 X11 authorization library libxcb1: i386 1.8.1-2+deb7u1 X C Binding libxdmcp6: i386 1:1.1.1-1 X11 Display Manager Control Protocol library libxext6: i386 2:1.3.1-2+deb7u1 X11 miscellaneous extension library libxml2: i386 2.8.0+dfsg1-7+nmu1 GNOME XML library libxmuu1: i386 2:1.1.
TC-6110 Linux User's Manual Software Components provides a framework for the exchange of management information between agents (servers) and clients. nfs-common 1:1.2.6-4 NFS support files common to client and server ntpdate 1:4.2.6.p5+dfsg-2 Client for setting system time from NTP servers openbsd-inetd 0.20091229-2 OpenBSD Internet Superserver openssh-blacklist 0.4.1+nmu1 List of default blacklisted OpenSSH RSA and DSA openssh-blacklist-extra 0.4.
TC-6110 Linux User's Manual Software Components python-reportbug 6.4.4 Python modules for interacting with bug tracking python-soappy 0.12.0-4 SOAP Support for Python python-support 1.0.15 Automated rebuilding support for Python modules python2.7 2.7.3-6 Interactive high-level object-oriented language systems (version 2.7) python2.7-minimal 2.7.3-6 Minimal subset of the Python language (version readline-common 6.2+dfsg-0.1 GNU readline and history libraries, common files rpcbind 0.2.
TC-6110 Linux User's Manual Software Components vim-common 2:7.3.547-7 Vi IMproved - Common files vim-runtime 2:7.3.547-7 Vi IMproved - Runtime files vim-tiny 2:7.3.547-7 Vi IMproved - enhanced vi editor - compact version w3m 0.5.3-8 WWW browsable pager with excellent wamerican 7.1-1 watchdog 5.12-1 tables/frames support American English dictionary words for /usr/share/dict System health checker and software/hardware watchdog handler wget 1.13.
B B. Moxa MIB File for TC-6110-LX --- MOXA-SYS-MIB.txt -MOXA-SYS-MIB DEFINITIONS ::= BEGIN IMPORTS enterprises, IpAddress, Integer32, OBJECT-TYPE, MODULE-IDENTITY, NOTIFICATION-TYPE FROM SNMPv2-SMI DisplayString FROM SNMPv2-TC; -- 1.3.6.1.4.1.8691.17.1 moxaSystem MODULE-IDENTITY LAST-UPDATED "201301031111Z" -- January 03, 2013 at 11:11 GMT ORGANIZATION "Moxa Techonology , Software Research Department" CONTACT-INFO "This mib is being maintained by the Moxa System Software R&D who handle product line.
TC-6110 Linux User's Manual Moxa MIB File for TC-6110-LX --- Type definitions -Minutes ::= Integer32 KBytes ::= INTEGER Second ::= Integer32 --- Node definitions --- 1.3.6.1.4.1.8691 moxa OBJECT IDENTIFIER ::= { enterprises 8691 } -- 1.3.6.1.4.1.8691.17 embeddedComputer OBJECT IDENTIFIER ::= { moxa 17 } -- 1.3.6.1.4.1.8691.17.1.1 productInfoMgmt OBJECT IDENTIFIER ::= { moxaSystem 1 } -- 1.3.6.1.4.1.8691.17.1.1.
TC-6110 Linux User's Manual Moxa MIB File for TC-6110-LX eg. 2012/01/23 19:22 -> 12012319." ::= { productInfoMgmt 4 } -- 1.3.6.1.4.1.8691.17.1.2 systemInfoMgmt OBJECT IDENTIFIER ::= { moxaSystem 2 } -- 1.3.6.1.4.1.8691.17.1.2.1 systemObject OBJECT IDENTIFIER ::= { systemInfoMgmt 1 } -- 1.3.6.1.4.1.8691.17.1.2.1.1 systemCpuUsage OBJECT-TYPE SYNTAX Integer32 MAX-ACCESS read-only STATUS current DESCRIPTION "Show CPU usage rate (0-100 %). Eg. 38" ::= { systemObject 1 } -- 1.3.6.1.4.1.8691.17.1.2.1.
TC-6110 Linux User's Manual Moxa MIB File for TC-6110-LX Note that this is same as hrMemorySize in HOST-RESOURCE." ::= { systemStorageObject 1 } -- 1.3.6.1.4.1.8691.17.1.2.3.2 systemVolumeCount OBJECT-TYPE SYNTAX Integer32 MAX-ACCESS read-only STATUS current DESCRIPTION "Show total volume count." ::= { systemStorageObject 2 } -- 1.3.6.1.4.1.8691.17.1.2.3.
TC-6110 Linux User's Manual Moxa MIB File for TC-6110-LX systemVolumeName OBJECT-TYPE SYNTAX OCTET STRING MAX-ACCESS read-only STATUS current DESCRIPTION "The name of the volume. Eg. /dev/sda1 Eg. C:" ::= { systemVolumeEntry 2 } -- 1.3.6.1.4.1.8691.17.1.2.3.3.1.3 systemVolumeLabel OBJECT-TYPE SYNTAX OCTET STRING MAX-ACCESS read-only STATUS current DESCRIPTION "The label of the volume. Eg. System Eg. Data" ::= { systemVolumeEntry 3 } -- 1.3.6.1.4.1.8691.17.1.2.3.3.1.
TC-6110 Linux User's Manual Moxa MIB File for TC-6110-LX -- 1.3.6.1.4.1.8691.17.1.4.2 biosSaveSetting OBJECT-TYPE SYNTAX INTEGER { none(0), apply(1), discard(2) } MAX-ACCESS read-write STATUS current DESCRIPTION "Write 1 to save bios setting, and read 0 mean setting had been applied." ::= { biosMgmt 2 } -- 1.3.6.1.4.1.8691.17.1.4.
TC-6110 Linux User's Manual Moxa MIB File for TC-6110-LX off(0), on(1), former(2) } MAX-ACCESS read-write STATUS current DESCRIPTION "Select power on after power fail behavior." ::= { powerFeature 1 } -- 1.3.6.1.4.1.8691.17.1.4.8.3 pwrLanWakeUp OBJECT-TYPE SYNTAX INTEGER { disbale(0), enable(1) } MAX-ACCESS read-write STATUS current DESCRIPTION "Enable/Disable wake on LAN functionality." ::= { powerFeature 3 } -- 1.3.6.1.4.1.8691.17.1.5 sensorMgmt OBJECT IDENTIFIER ::= { moxaSystem 5 } -- 1.3.6.1.4.1.
TC-6110 Linux User's Manual } Moxa MIB File for TC-6110-LX Integer32 -- 1.3.6.1.4.1.8691.17.1.5.1.1.1.1 tempSensorsIndex OBJECT-TYPE SYNTAX Integer32 (1..65535) MAX-ACCESS read-only STATUS current DESCRIPTION "Reference index for each observed device." ::= { tempSensorsEntry 1 } -- 1.3.6.1.4.1.8691.17.1.5.1.1.1.2 tempSensorsDevice OBJECT-TYPE SYNTAX DisplayString MAX-ACCESS read-only STATUS current DESCRIPTION "The name of the temperature sensor we are reading." ::= { tempSensorsEntry 2 } -- 1.3.6.1.4.1.
TC-6110 Linux User's Manual } Moxa MIB File for TC-6110-LX voltSensorsValue Integer32 -- 1.3.6.1.4.1.8691.17.1.5.1.2.1.1 voltSensorsIndex OBJECT-TYPE SYNTAX Integer32 (1..65535) MAX-ACCESS read-only STATUS current DESCRIPTION "Reference index for each observed device." ::= { voltSensorsEntry 1 } -- 1.3.6.1.4.1.8691.17.1.5.1.2.1.2 voltSensorsDevice OBJECT-TYPE SYNTAX DisplayString MAX-ACCESS read-only STATUS current DESCRIPTION "The name of the device we are reading." ::= { voltSensorsEntry 2 } -- 1.3.6.
TC-6110 Linux User's Manual } Moxa MIB File for TC-6110-LX DisplayString, accelerometerValue DisplayString, accelerometerTimestamp DisplayString -- 1.3.6.1.4.1.8691.17.1.5.1.3.1.1 accelerometerIndex OBJECT-TYPE SYNTAX Integer32 (1..65535) MAX-ACCESS read-only STATUS current DESCRIPTION "Reference index for each observed device." ::= { accelerometerEntry 1 } -- 1.3.6.1.4.1.8691.17.1.5.1.3.1.
TC-6110 Linux User's Manual Moxa MIB File for TC-6110-LX MAX-ACCESS read-only STATUS current DESCRIPTION "Number of digital input pin in current system." ::= { ioObject 1 } -- 1.3.6.1.4.1.8691.17.1.6.1.1.2 ioDiTable OBJECT-TYPE SYNTAX SEQUENCE OF IoDiEntry MAX-ACCESS not-accessible STATUS current DESCRIPTION "Table of digital input and their values." ::= { ioObject 2 } -- 1.3.6.1.4.1.8691.17.1.6.1.1.2.
TC-6110 Linux User's Manual Moxa MIB File for TC-6110-LX -- 1.3.6.1.4.1.8691.17.1.6.1.1.2.1.3 diValue OBJECT-TYPE SYNTAX INTEGER { low(0), high(1) } MAX-ACCESS read-only STATUS current DESCRIPTION "The digital input status, 0 is low, 1 is high." ::= { ioDiEntry 3 } -- 1.3.6.1.4.1.8691.17.1.6.1.1.2.1.4 diTrapEnable OBJECT-TYPE SYNTAX INTEGER { disable(0), enable(1) } MAX-ACCESS read-write STATUS current DESCRIPTION "Agent will send trap message when digital input pin status changed and this object enbeled.
TC-6110 Linux User's Manual Moxa MIB File for TC-6110-LX IoDoEntry ::= SEQUENCE { doIndex Integer32, doPort Integer32, doValue INTEGER } -- 1.3.6.1.4.1.8691.17.1.6.1.1.4.1.1 doIndex OBJECT-TYPE SYNTAX Integer32 (1..65535) MAX-ACCESS read-only STATUS current DESCRIPTION "Reference index for each digital output pin." ::= { ioDoEntry 1 } -- 1.3.6.1.4.1.8691.17.1.6.1.1.4.1.2 doPort OBJECT-TYPE SYNTAX Integer32 (0..65535) MAX-ACCESS read-only STATUS current DESCRIPTION "The port number of digital output pin.
TC-6110 Linux User's Manual Moxa MIB File for TC-6110-LX ledNumber OBJECT-TYPE SYNTAX Integer32 (0..65535) MAX-ACCESS read-only STATUS current DESCRIPTION "Description." ::= { perLedMgmt 1 } -- 1.3.6.1.4.1.8691.17.1.6.2.2 ledTable OBJECT-TYPE SYNTAX SEQUENCE OF LedEntry MAX-ACCESS not-accessible STATUS current DESCRIPTION "Description." ::= { perLedMgmt 2 } -- 1.3.6.1.4.1.8691.17.1.6.2.2.1 ledEntry OBJECT-TYPE SYNTAX LedEntry MAX-ACCESS not-accessible STATUS current DESCRIPTION "Description.
TC-6110 Linux User's Manual Moxa MIB File for TC-6110-LX -- 1.3.6.1.4.1.8691.17.1.6.2.2.1.3 ledValue OBJECT-TYPE SYNTAX INTEGER { off(0), on(1) } MAX-ACCESS read-write STATUS current DESCRIPTION "Description." ::= { ledEntry 3 } -- 1.3.6.1.4.1.8691.17.1.6.3 perSerialMgmt OBJECT IDENTIFIER ::= { peripheralMgmt 3 } -- 1.3.6.1.4.1.8691.17.1.6.3.1 uartNumber OBJECT-TYPE SYNTAX Integer32 (0..65535) MAX-ACCESS read-only STATUS current DESCRIPTION "Number of internal UART in current system.
TC-6110 Linux User's Manual Moxa MIB File for TC-6110-LX MAX-ACCESS read-only STATUS current DESCRIPTION "Reference index for each UART port." ::= { uartConfigEntry 1 } -- 1.3.6.1.4.1.8691.17.1.6.3.2.1.2 uartType OBJECT-TYPE SYNTAX INTEGER { rs232(0), rs485w2(1), rs422(2), rs485w4(3) } MAX-ACCESS read-write STATUS current DESCRIPTION "The UART mode, 0 is RS232, 1 is RS485 2 wires, 2 is RS422, 3 is RS485 4 wires." ::= { uartConfigEntry 2 } -- 1.3.6.1.4.1.8691.17.1.6.
TC-6110 Linux User's Manual Moxa MIB File for TC-6110-LX INDEX { usbDeviceIndex } ::= { usbDeviceTable 1 } UsbDeviceEntry ::= SEQUENCE { usbDeviceIndex Integer32, usbDeviceVendorID OCTET STRING, usbDeviceProductID OCTET STRING, usbDeviceActiveClass INTEGER } -- 1.3.6.1.4.1.8691.17.1.6.4.1.3.1.1 usbDeviceIndex OBJECT-TYPE SYNTAX Integer32 (1..65535) MAX-ACCESS read-only STATUS current DESCRIPTION "The index is identical to usbPortIndex for the correspondent USB port" ::= { usbDeviceEntry 1 } -- 1.3.6.1.4.
TC-6110 Linux User's Manual Moxa MIB File for TC-6110-LX DESCRIPTION "This object returns USB Device Class type of the active configuration" ::= { usbDeviceEntry 4 } -- 1.3.6.1.4.1.8691.17.1.6.4.1.4 usbPlugTrapEnable OBJECT-TYPE SYNTAX INTEGER { disable(0), enable(1) } MAX-ACCESS read-write STATUS current DESCRIPTION "Agent will send trap message when USB device inserted or removed and this object enbeled." ::= { usbObject 4 } -- 1.3.6.1.4.1.8691.17.1.6.4.
TC-6110 Linux User's Manual Moxa MIB File for TC-6110-LX "To show the watchdog monitor program status." ::= { systemWatchdog 2 } -- 1.3.6.1.4.1.8691.17.1.7 powerMgmt OBJECT IDENTIFIER ::= { moxaSystem 7 } -- 1.3.6.1.4.1.8691.17.1.7.2 powerPolicy OBJECT-TYPE SYNTAX INTEGER { balanced(1), power_saver(2), high_performance(3) } MAX-ACCESS read-write STATUS current DESCRIPTION "Current system power policy." ::= { powerMgmt 2 } -- 1.3.6.1.4.1.8691.17.1.
C C. Sample Scripts & Firewall Rules Here are the sample scripts referenced in this manual that were too long to include in the text.
TC-6110 Linux User's Manual Sample Scripts & Firewall Rules A Sample Initialization Script #! /bin/sh # Copyright (c) XXXX <> # All rights reserved. # # # /etc/init.d/<> # and its symbolic link # /usr/sbin/rc<> ### BEGIN INIT INFO # Provides: # Required-Start: # Required-Stop: # Default-Start: <> $network 3 5 # Default-Stop: 0 1 2 6 # Description: The <> daemon is ...
TC-6110 Linux User's Manual Sample Scripts & Firewall Rules rc_status -v ;; stop) echo -n "Shutting down <> " ## Stop daemon with killproc(8) and if this fails ## killproc sets the return value according to LSB. killproc -TERM $<>_BIN # Remember status and be verbose rc_status -v ;; restart) ## Stop the service and regardless of whether it was ## running or not, start it again.
TC-6110 Linux User's Manual Sample Scripts & Firewall Rules exit 1 esac ;; rc_exit A Sample Firewall #!/bin/bash # If you put this shell script in the /home/nat.sh # Remember to chmod 744 /home/nat.sh # Edit the rc.local file to make this shell startup automatically. # vi /etc/rc.local # Add a line in the end of rc.local /home/nat.sh EXIF= “eth0” #This is an external interface for setting up a valid IP address. EXNET= “192.168.4.0/24” #This is an internal network address. # Step 1. Insert modules.