summaryrefslogtreecommitdiff
path: root/package/initramfs
diff options
context:
space:
mode:
Diffstat (limited to 'package/initramfs')
-rw-r--r--package/initramfs/initramfs.default16
-rw-r--r--package/initramfs/root/etc/fstab2
-rw-r--r--package/initramfs/root/etc/hosts12
-rw-r--r--package/initramfs/root/etc/init.d/bridge3
-rw-r--r--package/initramfs/root/etc/init.d/serial3
-rw-r--r--package/initramfs/root/etc/network/NOPRUNE0
-rw-r--r--package/initramfs/root/etc/network/interfaces16
-rw-r--r--package/initramfs/root/etc/passwd1
-rwxr-xr-xpackage/initramfs/root/etc/rc.sysinit5
-rwxr-xr-xpackage/initramfs/root/etc/rcS.d/10network3
-rw-r--r--package/initramfs/root/etc/resolv.conf2
-rw-r--r--package/initramfs/root/etc/sysctl.conf2
-rw-r--r--package/initramfs/root/factory/NOPRUNE0
-rw-r--r--package/initramfs/root/factory/config/NOPRUNE0
-rw-r--r--package/initramfs/root/factory/config/japach.conf54
-rw-r--r--package/initramfs/root/factory/config/network7
-rw-r--r--package/initramfs/root/factory/fstab3
-rw-r--r--package/initramfs/root/factory/hosts4
-rw-r--r--package/initramfs/root/factory/network/NOPRUNE0
-rw-r--r--package/initramfs/root/factory/network/interfaces16
-rw-r--r--package/initramfs/root/factory/passwd1
-rw-r--r--package/initramfs/root/factory/rcS.d/NOPRUNE0
-rw-r--r--package/initramfs/root/factory/resolv.conf2
-rw-r--r--package/initramfs/root/factory/service.conf7
-rw-r--r--package/initramfs/root/factory/sip.conf5
-rw-r--r--package/initramfs/root/factory/sysctl.conf4
-rw-r--r--package/initramfs/root/factory/udhcpd.conf117
-rw-r--r--package/initramfs/root/factory/wired.conf66
-rw-r--r--package/initramfs/root/factory/wired8021x.conf19
-rwxr-xr-xpackage/initramfs/root/rc.init6
30 files changed, 341 insertions, 35 deletions
diff --git a/package/initramfs/initramfs.default b/package/initramfs/initramfs.default
index 7623183937..3f80ea7f13 100644
--- a/package/initramfs/initramfs.default
+++ b/package/initramfs/initramfs.default
@@ -1,4 +1,4 @@
-# Add new direcories here
+# Add new directories here
dir /bin 0755 0 0
dir /etc 0755 0 0
dir /etc/config 0755 0 0
@@ -7,14 +7,12 @@ dir /etc/network/if-down.d 0755 0 0
dir /etc/network/if-post-down.d 0755 0 0
dir /etc/network/if-pre-up.d 0755 0 0
dir /etc/network/if-up.d 0755 0 0
-dir /etc/plc 0755 0 0
dir /etc/rcS.d 0755 0 0
dir /etc/udhcpc 0755 0 0
+dir /factory 0755 0 0
dir /lib 0755 0 0
dir /lib/modules 0755 0 0
dir /mnt 0755 0 0
-dir /mnt/flashdisk 0755 0 0
-dir /net 0755 0 0
dir /proc 0755 0 0
dir /root 0755 0 0
dir /sbin 0755 0 0
@@ -25,6 +23,7 @@ dir /usr 0755 0 0
dir /usr/bin 0755 0 0
dir /usr/lib 0755 0 0
dir /usr/lib/boa 0755 0 0
+dir /usr/local 0755 0 0
dir /usr/share 0755 0 0
dir /usr/share/www 0755 0 0
dir /usr/share/cgi-bin 0755 0 0
@@ -37,18 +36,9 @@ dir /var/run 0755 0 0
dir /var/state 0755 0 0
# Add new symbolic links here
-slink /usr/local /mnt/flashdisk 777 0 0
-slink /etc/passwd /usr/local/etc/passwd 777 0 0
-slink /etc/config/network /usr/local/etc/config/network 777 0 0
-slink /etc/network/interfaces /usr/local/etc/network/interfaces 777 0 0
-slink /etc/plc/sysctl.conf /usr/local/etc/plc/sysctl.conf 777 0 0
-slink /etc/sysctl.conf /usr/local/etc/sysctl.conf 777 0 0
-slink /etc/udhcpd.bssid /usr/local/etc/udhcpd.bssid 777 0 0
-slink /etc/udhcpd.conf /usr/local/etc/udhcpd.conf 777 0 0
slink /usr/bin/testudp /bin/mesbox 777 0 0
slink /usr/bin/testraw /bin/mesbox 777 0 0
slink /usr/bin/ber /bin/mesbox 777 0 0
-slink /etc/resolv.conf /mnt/flashdisk/resolv.conf 777 0 0
slink /init /sbin/init 777 0 0
# Add device nodes here
diff --git a/package/initramfs/root/etc/fstab b/package/initramfs/root/etc/fstab
index 2fa38eaeea..5b557ab790 100644
--- a/package/initramfs/root/etc/fstab
+++ b/package/initramfs/root/etc/fstab
@@ -1,3 +1,3 @@
-/dev/mtdblock2 /mnt/flashdisk jffs2 defaults 0 0
+/dev/mtdblock2 /usr/local jffs2 defaults 0 0
/proc /proc proc defaults 0 0
/sys /sys sysfs defaults 0 0
diff --git a/package/initramfs/root/etc/hosts b/package/initramfs/root/etc/hosts
index e804cf94f7..578dfe3d71 100644
--- a/package/initramfs/root/etc/hosts
+++ b/package/initramfs/root/etc/hosts
@@ -1,16 +1,4 @@
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
-192.168.92.1 ChevalBlanc
-192.168.92.44 minervois
-192.168.92.42 lumbrosco
-192.168.92.45 fronton
-192.168.92.41 mondeuse
-192.168.100.124 kurgan
-
-192.168.101.120 milos
-192.168.101.17 cris1
-192.168.101.18 cris2
-192.168.101.19 cris3
-
diff --git a/package/initramfs/root/etc/init.d/bridge b/package/initramfs/root/etc/init.d/bridge
index 849d8e137b..5b009255c3 100644
--- a/package/initramfs/root/etc/init.d/bridge
+++ b/package/initramfs/root/etc/init.d/bridge
@@ -37,9 +37,10 @@ case "$1" in
ifdown br0
brctl delif br0 plc0
brctl delif br0 eth0
+ brctl delbr br0
+ echo > /var/run/ifstate
ifup eth0
ifup plc0
- brctl delbr br0
;;
restart)
$0 stop
diff --git a/package/initramfs/root/etc/init.d/serial b/package/initramfs/root/etc/init.d/serial
index b822f1c2e4..545b2c4239 100644
--- a/package/initramfs/root/etc/init.d/serial
+++ b/package/initramfs/root/etc/init.d/serial
@@ -8,7 +8,8 @@ case "$1" in
# check that the server is present
[ -x /sbin/getty ] || exit 0
echo "Starting Serial console"
- /sbin/getty -L 115200 ttyS00 vt100 &
+#deactivated from now
+#/sbin/getty -L 115200 ttyS00 vt100 &
touch /var/run/serial.pid
echo $! > /var/run/serial.pid
;;
diff --git a/package/initramfs/root/etc/network/NOPRUNE b/package/initramfs/root/etc/network/NOPRUNE
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/package/initramfs/root/etc/network/NOPRUNE
diff --git a/package/initramfs/root/etc/network/interfaces b/package/initramfs/root/etc/network/interfaces
new file mode 100644
index 0000000000..b979982d63
--- /dev/null
+++ b/package/initramfs/root/etc/network/interfaces
@@ -0,0 +1,16 @@
+auto lo eth0 plc0 br0
+
+ iface lo inet loopback
+
+ iface eth0 inet static
+ address 192.168.2.1
+ netmask 255.255.255.0
+
+ iface plc0 inet static
+ address 192.168.2.1
+ netmask 255.255.255.0
+
+ iface br0 inet static
+ address 192.168.2.1
+ netmask 255.255.255.0
+
diff --git a/package/initramfs/root/etc/passwd b/package/initramfs/root/etc/passwd
new file mode 100644
index 0000000000..8eec8ec56c
--- /dev/null
+++ b/package/initramfs/root/etc/passwd
@@ -0,0 +1 @@
+root:$1$$d.CxeKh5j9.YxhlIB3adj1:0:0:root:/root:/bin/sh
diff --git a/package/initramfs/root/etc/rc.sysinit b/package/initramfs/root/etc/rc.sysinit
index 427d2e36cc..18cb05da82 100755
--- a/package/initramfs/root/etc/rc.sysinit
+++ b/package/initramfs/root/etc/rc.sysinit
@@ -10,6 +10,9 @@
PATH=/bin:/sbin:/usr/bin:/usr/sbin
export PATH
+# Get the current configuration
+cp -a /usr/local/etc/* /etc
+
# Set the kernel log level
if [ -f /etc/boot.silent ]; then
# Supress kernel messages to console
@@ -27,7 +30,7 @@ if [ -f /etc/rc.modules ]; then
fi
# Mount remaining filesystems
-mount -a
+#mount -a
# Clear temporary files
>/var/run/utmp
diff --git a/package/initramfs/root/etc/rcS.d/10network b/package/initramfs/root/etc/rcS.d/10network
index f6b643f0ef..a496a65e4c 100755
--- a/package/initramfs/root/etc/rcS.d/10network
+++ b/package/initramfs/root/etc/rcS.d/10network
@@ -38,7 +38,8 @@ if [ -f /proc/sys/net/ipv4/ip_always_defrag ]; then
echo "IPv4 automatic defragmentation is ${message}...."
fi
-ifup -a
+ifup eth0
+ifup plc0
touch /var/lock/subsys/network
diff --git a/package/initramfs/root/etc/resolv.conf b/package/initramfs/root/etc/resolv.conf
new file mode 100644
index 0000000000..3ccb52d833
--- /dev/null
+++ b/package/initramfs/root/etc/resolv.conf
@@ -0,0 +1,2 @@
+search spidcom.com
+nameserver 192.168.2.254
diff --git a/package/initramfs/root/etc/sysctl.conf b/package/initramfs/root/etc/sysctl.conf
new file mode 100644
index 0000000000..12baa96480
--- /dev/null
+++ b/package/initramfs/root/etc/sysctl.conf
@@ -0,0 +1,2 @@
+net.plc.tmo_token = 20
+net.plc.master = 0
diff --git a/package/initramfs/root/factory/NOPRUNE b/package/initramfs/root/factory/NOPRUNE
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/package/initramfs/root/factory/NOPRUNE
diff --git a/package/initramfs/root/factory/config/NOPRUNE b/package/initramfs/root/factory/config/NOPRUNE
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/package/initramfs/root/factory/config/NOPRUNE
diff --git a/package/initramfs/root/factory/config/japach.conf b/package/initramfs/root/factory/config/japach.conf
new file mode 100644
index 0000000000..d915999e3c
--- /dev/null
+++ b/package/initramfs/root/factory/config/japach.conf
@@ -0,0 +1,54 @@
+#
+# configuration file for japach webserver
+#
+# Jirka Kosina <jikos@jikos.cz>
+#
+
+
+# TCP port to listen on
+port 80
+
+# Name of the server
+#servername ???
+
+# Directory in filesystem which will act as root directory of the webserver
+documentroot /usr/local/share/www
+
+# What priviledges should forked children, who interact with user have.
+uid 0
+gid 0
+
+# Name of the directory in user homedirs, which will be searched
+userdir root
+
+# File which should be used as primary log
+masterlog /var/log/japach.log
+
+# Maximum count of concurently served requests.
+maxchilds 2
+
+# Content types assigned to filename exitensions.
+type gif image/gif
+type jpg image/jpg
+type html text/html
+type png image/png
+
+# A list of directories, in which every document served to user must be
+# located, otherwise he will get HTTP 403 Forbiddent Error.
+cage /usr/local/share/www/
+cage /usr/local/share/www/cgi-bin
+
+# A list of directories where cgi-scripts can be executed from.
+cgidir /usr/local/share/www/cgi-bin
+
+# How to get along with symlinks
+symlinks follow_symlinks
+
+# VirtualHosts.
+#
+# format:
+# virtualhost name documentroot log
+#
+# Please note, that the cage also matters here.
+#
+virtualhost some.virtual.cz /usr/local/share/www /usr/local/share/www/virtual.log
diff --git a/package/initramfs/root/factory/config/network b/package/initramfs/root/factory/config/network
new file mode 100644
index 0000000000..b3359383ad
--- /dev/null
+++ b/package/initramfs/root/factory/config/network
@@ -0,0 +1,7 @@
+NETWORKING=yes
+FORWARD_IPV4=no
+DEFRAG_IPV4=no
+BRIDGING=yes
+STP=yes
+ETH_MODE=AUTO
+
diff --git a/package/initramfs/root/factory/fstab b/package/initramfs/root/factory/fstab
new file mode 100644
index 0000000000..5b557ab790
--- /dev/null
+++ b/package/initramfs/root/factory/fstab
@@ -0,0 +1,3 @@
+/dev/mtdblock2 /usr/local jffs2 defaults 0 0
+/proc /proc proc defaults 0 0
+/sys /sys sysfs defaults 0 0
diff --git a/package/initramfs/root/factory/hosts b/package/initramfs/root/factory/hosts
new file mode 100644
index 0000000000..578dfe3d71
--- /dev/null
+++ b/package/initramfs/root/factory/hosts
@@ -0,0 +1,4 @@
+# Do not remove the following line, or various programs
+# that require network functionality will fail.
+127.0.0.1 localhost.localdomain localhost
+
diff --git a/package/initramfs/root/factory/network/NOPRUNE b/package/initramfs/root/factory/network/NOPRUNE
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/package/initramfs/root/factory/network/NOPRUNE
diff --git a/package/initramfs/root/factory/network/interfaces b/package/initramfs/root/factory/network/interfaces
new file mode 100644
index 0000000000..c957043e9f
--- /dev/null
+++ b/package/initramfs/root/factory/network/interfaces
@@ -0,0 +1,16 @@
+auto lo eth0 plc0 br0
+
+ iface lo inet loopback
+
+ iface eth0 inet static
+ address 192.168.2.1
+ netmask 255.255.255.0
+
+ iface plc0 inet static
+ address 0.0.0.0
+ netmask 0.0.0.0
+
+ iface br0 inet static
+ address 192.168.2.1
+ netmask 255.255.255.0
+
diff --git a/package/initramfs/root/factory/passwd b/package/initramfs/root/factory/passwd
new file mode 100644
index 0000000000..8eec8ec56c
--- /dev/null
+++ b/package/initramfs/root/factory/passwd
@@ -0,0 +1 @@
+root:$1$$d.CxeKh5j9.YxhlIB3adj1:0:0:root:/root:/bin/sh
diff --git a/package/initramfs/root/factory/rcS.d/NOPRUNE b/package/initramfs/root/factory/rcS.d/NOPRUNE
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/package/initramfs/root/factory/rcS.d/NOPRUNE
diff --git a/package/initramfs/root/factory/resolv.conf b/package/initramfs/root/factory/resolv.conf
new file mode 100644
index 0000000000..3ccb52d833
--- /dev/null
+++ b/package/initramfs/root/factory/resolv.conf
@@ -0,0 +1,2 @@
+search spidcom.com
+nameserver 192.168.2.254
diff --git a/package/initramfs/root/factory/service.conf b/package/initramfs/root/factory/service.conf
new file mode 100644
index 0000000000..adeaee8e5d
--- /dev/null
+++ b/package/initramfs/root/factory/service.conf
@@ -0,0 +1,7 @@
+FTP=yes
+SNMP=yes
+SERIAL=yes
+TELNET=no
+8021X_SUPPLICANT=no
+8021X_AUTH=no
+HTTP=yes
diff --git a/package/initramfs/root/factory/sip.conf b/package/initramfs/root/factory/sip.conf
new file mode 100644
index 0000000000..b1015b37e6
--- /dev/null
+++ b/package/initramfs/root/factory/sip.conf
@@ -0,0 +1,5 @@
+USERNAME = 123
+PASSWORD = 123
+PROXY = 192.168.100.200
+COUNTRY = DEFAULT
+VAD = NO \ No newline at end of file
diff --git a/package/initramfs/root/factory/sysctl.conf b/package/initramfs/root/factory/sysctl.conf
new file mode 100644
index 0000000000..09f523aa77
--- /dev/null
+++ b/package/initramfs/root/factory/sysctl.conf
@@ -0,0 +1,4 @@
+net.plc.master = slave
+net.plc.preferred_bssid = 0
+net.plc.bssid = 0
+
diff --git a/package/initramfs/root/factory/udhcpd.conf b/package/initramfs/root/factory/udhcpd.conf
new file mode 100644
index 0000000000..8e6ccbf68a
--- /dev/null
+++ b/package/initramfs/root/factory/udhcpd.conf
@@ -0,0 +1,117 @@
+# Sample udhcpd configuration file (/etc/udhcpd.conf)
+
+# The start and end of the IP lease block
+
+start 192.168.0.1 #default: 192.168.0.20
+end 192.168.0.254 #default: 192.168.0.254
+
+
+# The interface that udhcpd will use
+
+interface br0 #default: eth0
+
+
+# The maximim number of leases (includes addressesd reserved
+# by OFFER's, DECLINE's, and ARP conficts
+
+# no leases for now: the DHCPD is only used for bssid
+max_leases 0 #default: 254
+
+
+# If remaining is true (default), udhcpd will store the time
+# remaining for each lease in the udhcpd leases file. This is
+# for embedded systems that cannot keep time between reboots.
+# If you set remaining to no, the absolute time that the lease
+# expires at will be stored in the dhcpd.leases file.
+
+remaining yes #default: yes
+
+
+# The time period at which udhcpd will write out a dhcpd.leases
+# file. If this is 0, udhcpd will never automatically write a
+# lease file. (specified in seconds)
+
+auto_time 7200 #default: 7200 (2 hours)
+
+
+# The amount of time that an IP will be reserved (leased) for if a
+# DHCP decline message is received (seconds).
+
+#decline_time 3600 #default: 3600 (1 hour)
+
+
+# The amount of time that an IP will be reserved (leased) for if an
+# ARP conflct occurs. (seconds
+
+#conflict_time 3600 #default: 3600 (1 hour)
+
+
+# How long an offered address is reserved (leased) in seconds
+
+#offer_time 60 #default: 60 (1 minute)
+
+# If a lease to be given is below this value, the full lease time is
+# instead used (seconds).
+
+#min_lease 60 #defult: 60
+
+
+# The location of the leases file
+
+lease_file /var/udhcpd.leases #defualt: /var/lib/misc/udhcpd.leases
+
+# The location of the pid file
+#pidfile /var/run/udhcpd.pid #default: /var/run/udhcpd.pid
+
+# Everytime udhcpd writes a leases file, the below script will be called.
+# Useful for writing the lease file to flash every few hours.
+
+#notify_file #default: (no script)
+
+#notify_file dumpleases # <--- usefull for debugging
+
+# The following are bootp specific options, setable by udhcpd.
+
+#siaddr 192.168.0.22 #default: 0.0.0.0
+
+#sname zorak #default: (none)
+
+#boot_file /var/nfs_root #default: (none)
+
+# The remainer of options are DHCP options and can be specifed with the
+# keyword 'opt' or 'option'. If an option can take multiple items, such
+# as the dns option, they can be listed on the same line, or multiple
+# lines. The only option with a default is 'lease'.
+
+#Examles
+#opt dns 192.168.10.2 192.168.10.10
+#option subnet 255.255.255.0
+#opt router 192.168.10.2
+#opt wins 192.168.10.10
+#option dns 129.219.13.81 # appened to above DNS servers for a total of 3
+#option domain local
+option lease 864000 # 10 days of seconds
+
+
+# Currently supported options, for more info, see options.c
+#opt subnet
+#opt timezone
+#opt router
+#opt timesvr
+#opt namesvr
+#opt dns
+#opt logsvr
+#opt cookiesvr
+#opt lprsvr
+#opt bootsize
+#opt domain
+#opt swapsvr
+#opt rootpath
+#opt ipttl
+#opt mtu
+#opt broadcast
+#opt wins
+#opt lease
+#opt ntpsrv
+#opt tftp
+#opt bootfile
diff --git a/package/initramfs/root/factory/wired.conf b/package/initramfs/root/factory/wired.conf
new file mode 100644
index 0000000000..bd39d8a3ae
--- /dev/null
+++ b/package/initramfs/root/factory/wired.conf
@@ -0,0 +1,66 @@
+##### hostapd configuration file ##############################################
+# Empty lines and lines starting with # are ignored
+
+# Example configuration file for wired authenticator. See hostapd.conf for
+# more details.
+
+interface=br0
+driver=wired
+logger_stdout=-1
+logger_syslog=-1
+logger_stdout_level=4
+logger_syslog_level=4
+debug=0
+dump_file=/tmp/hostapd.dump
+ctrl_interface=/var/run/hostapd
+
+ieee8021x=1
+eap_message=hello
+eapol_key_index_workaround=0
+eap_reauth_period=10
+eap_server=0
+#eap_user_file=/etc/hostapd.eap_user
+
+use_pae_group_addr=0
+
+##### RADIUS configuration ####################################################
+# for IEEE 802.1X with external Authentication Server, IEEE 802.11
+# authentication with external ACL for MAC addresses, and accounting
+
+# The own IP address of the access point (used as NAS-IP-Address)
+own_ip_addr=127.0.0.1
+
+# Optional NAS-Identifier string for RADIUS messages. When used, this should be
+# a unique to the NAS within the scope of the RADIUS server. For example, a
+# fully qualified domain name can be used here.
+#nas_identifier=ap.example.com
+
+# RADIUS authentication server
+auth_server_addr=192.168.101.120
+auth_server_port=1812
+auth_server_shared_secret=spidcom
+
+# RADIUS accounting server
+#acct_server_addr=127.0.0.1
+#acct_server_port=1813
+#acct_server_shared_secret=radius
+
+#radius_server_clients=/etc/hostapd.radius_clients
+#radius_server_auth_port=1812
+
+# CA certificate (PEM or DER file) for EAP-TLS/PEAP/TTLS
+#ca_cert=/root/ca.pem
+
+# Server certificate (PEM or DER file) for EAP-TLS/PEAP/TTLS
+#server_cert=/root/authenticator.pem
+
+# Private key matching with the server certificate for EAP-TLS/PEAP/TTLS
+# This may point to the same file as server_cert if both certificate and key
+# are included in a single file. PKCS#12 (PFX) file (.p12/.pfx) can also be
+# used by commenting out server_cert and specifying the PFX file as the
+# private_key.
+#private_key=/root/authenticator.key
+
+# Passphrase for private key
+#private_key_passwd=secret passphrase
+
diff --git a/package/initramfs/root/factory/wired8021x.conf b/package/initramfs/root/factory/wired8021x.conf
new file mode 100644
index 0000000000..295fd6d6d2
--- /dev/null
+++ b/package/initramfs/root/factory/wired8021x.conf
@@ -0,0 +1,19 @@
+##### wpa_supplicant configuration file ##############################################
+# Empty lines and lines starting with # are ignored
+
+# Example configuration file for wired authenticator. See wpa_supplicant.conf for
+# more details.
+
+# IEEE 802.1X with EAP-MD5
+
+ctrl_interface=/var/run/wpa_supplicant
+ap_scan=0
+
+network={
+ key_mgmt=IEEE8021X
+ eap=MD5
+ identity="spid_user"
+ password="spid_password"
+}
+
+
diff --git a/package/initramfs/root/rc.init b/package/initramfs/root/rc.init
index 92290c2fee..cd81947c63 100755
--- a/package/initramfs/root/rc.init
+++ b/package/initramfs/root/rc.init
@@ -29,15 +29,11 @@ echo ""
echo ""
# Mount filesystems
-#echo "Remounting root read-write...."
-#mount -n -o remount,rw /
+mount -a
# Clear mtab
>/etc/mtab
-# Enter root into mtab
-#mount -f /
-
# Let the 'real' rc.sysinit take over
exec /etc/rc.sysinit