Infineon Amazon Status
From GPLdevWiki
Infineon Amazon Manuals >> System Status
Contents |
Overview
System Status on Infineon Amazon chipset driven GPLed devices.
All devices based on the Infineon Amazon chipset share a common set of startup scripts in rc.d and init.d which are launched from the boot script rcS. Services are usually launched asynchronous, some of them being time intense ones (like PPPoE), making it difficult to find out what succeeded when.
For this a status signalling mechanism is provided through the file /tmp/system_status.
- (C) 2008 Ralf Steines aka Hippie2000 - Released under GNU FDL 1.2.
- This document is actively maintained. Latest version on wiki.gpl-devices.org.
File Format
The file system_status consists of tags grouping key/value pairs, similar to the Infineon Amazon Config. If an application writes to the file it replaces an entire tag (read / modify / write). Tag names are unique and are never substrings of other tagnames to avoid conflicts. This file is not shell compatible since variable names are not unique.
#<< tag_name key1="<value1>" # Comments on the right side of values key2="<value2>" # are not necessarily supported but are key3="<value3>" # used here to explain things. #>> tag_name
Access Commands
Writing one file from multiple applications in a multitasking environment is a risky task, which requires some locking or semaphore protection to avoid data loss. That is why system_status is never modified directly. For this an access executable is provided:
- See: status_oper
Sample File
Here a real life example from a disconnected multi-PVC router to get the picture:
#<< Lan1_IF_Info STATUS="UP" IP="192.168.1.1" MASK="255.255.255.0" #>> Lan1_IF_Info #<< lan_interface_br0 ip=192.168.1.1 netmask=255.255.255.0 #>> lan_interface_br0 #<< Wan1_IF_Info STATUS="DISCONNECT" #>> Wan1_IF_Info #<< bringup_wan1_if status="start" #>> bringup_wan1_if #<< Wan1_PPPD_Info PPPDSTAT="TERMINATED" #>> Wan1_PPPD_Info #<< Wan2_IF_Info STATUS="CONNECTED" IP="192.168.1.1" MASK="255.255.255.0" #>> Wan2_IF_Info #<< bringup_wan2_services status="start" #>> bringup_wan2_services #<< bringup_wan2_if status="start" #>> bringup_wan2_if #<< Wan3_IF_Info STATUS="CONNECTED" IP="192.168.1.1" MASK="255.255.255.0" #>> Wan3_IF_Info #<< bringup_wan3_services status="start" #>> bringup_wan3_services #<< bringup_wan3_if status="start" #>> bringup_wan3_if #<< Wan4_IF_Info STATUS="DISCONNECT" #>> Wan4_IF_Info #<< WAN1_DNS_SERVER DNS1="0" #>> WAN1_DNS_SERVER #<< bringup_wan1_pppoe status="stop" #>> bringup_wan1_pppoe

