diff options
author | Jesse Gilles <jgilles@multitech.com> | 2010-04-30 10:50:57 -0500 |
---|---|---|
committer | Jesse Gilles <jgilles@multitech.com> | 2010-04-30 10:50:57 -0500 |
commit | 0431f878edd38a1af264e5727e1e4d604f1a95fd (patch) | |
tree | 8fbede06fa2bf4835e9d032d1263ae120eb99837 /recipes/multitech/config | |
parent | 15028387890effa23f9cd0479b586f31c0752b88 (diff) |
add Multi-Tech-specific recipes
Diffstat (limited to 'recipes/multitech/config')
-rw-r--r-- | recipes/multitech/config/config.init | 59 | ||||
-rw-r--r-- | recipes/multitech/config/group | 40 | ||||
-rw-r--r-- | recipes/multitech/config/network/interfaces | 12 | ||||
-rw-r--r-- | recipes/multitech/config/passwd | 18 | ||||
-rw-r--r-- | recipes/multitech/config/ppp/chap-secrets | 3 | ||||
-rw-r--r-- | recipes/multitech/config/ppp/options | 17 | ||||
-rw-r--r-- | recipes/multitech/config/ppp/pap-secrets | 3 | ||||
-rw-r--r-- | recipes/multitech/config/ppp/peers/cdma | 9 | ||||
-rw-r--r-- | recipes/multitech/config/ppp/peers/cdma_chat | 18 | ||||
-rw-r--r-- | recipes/multitech/config/ppp/peers/gsm | 10 | ||||
-rw-r--r-- | recipes/multitech/config/ppp/peers/gsm_chat | 23 |
11 files changed, 212 insertions, 0 deletions
diff --git a/recipes/multitech/config/config.init b/recipes/multitech/config/config.init new file mode 100644 index 0000000000..770be18e23 --- /dev/null +++ b/recipes/multitech/config/config.init @@ -0,0 +1,59 @@ +#!/bin/sh + +CONFIG_MTDC=/dev/mtd6 +CONFIG_DIR=/var/config + +FILES="network/interfaces \ +ppp/options \ +ppp/pap-secrets \ +ppp/chap-secrets \ +ppp/peers \ +passwd \ +group" + +case $1 in + start) + echo "Mounting ${CONFIG_DIR}" + mkdir -p ${CONFIG_DIR} + mount ${CONFIG_DIR} + + # Prepare flash for JFFS2 if mount fails + if [ $? -ne 0 ]; then + echo "Creating ${CONFIG_DIR}" + flash_eraseall -j ${CONFIG_MTDC} + mount ${CONFIG_DIR} + fi + + # Default all config files if requested + cd ${CONFIG_DIR} + if [ -f force_defaults ]; then + echo "Extracting default config files" + tar -xvf /etc/defaults.tar.gz + rm -f force_defaults + fi + + # Extract any missing files + TARFILES=`tar -tf /etc/defaults.tar.gz` + for file in $TARFILES; do + if [ ! -e $file ]; then + tar -xvf /etc/defaults.tar.gz $file + fi + done + + # Create links in /etc + for file in $FILES; do + if [ ! -L /etc/$file ]; then + echo "Creating link to ${CONFIG_DIR}/$file" + rm -rf /etc/$file + ln -sf ${CONFIG_DIR}/$file /etc/$file + fi + done + + ;; + + *) + echo "Usage: $0 {start}" + exit 2 + ;; + +esac diff --git a/recipes/multitech/config/group b/recipes/multitech/config/group new file mode 100644 index 0000000000..ee59d5c24b --- /dev/null +++ b/recipes/multitech/config/group @@ -0,0 +1,40 @@ +root:*:0: +daemon:*:1: +bin:*:2: +sys:*:3: +adm:*:4: +tty:*:5: +disk:*:6: +lp:*:7: +mail:*:8: +news:*:9: +uucp:*:10: +man:*:12: +proxy:*:13: +kmem:*:15: +dialout:*:20: +fax:*:21: +voice:*:22: +cdrom:*:24: +floppy:*:25: +tape:*:26: +sudo:*:27: +audio:*:29: +dip:*:30: +www-data:*:33: +backup:*:34: +operator:*:37: +list:*:38: +irc:*:39: +src:*:40: +gnats:*:41: +shadow:*:42: +utmp:*:43: +video:*:44: +sasl:*:45: +plugdev:*:46: +staff:*:50: +games:*:60: +users:*:100: +mysql:*:64001: +nogroup:*:65534: diff --git a/recipes/multitech/config/network/interfaces b/recipes/multitech/config/network/interfaces new file mode 100644 index 0000000000..b5f625a9e2 --- /dev/null +++ b/recipes/multitech/config/network/interfaces @@ -0,0 +1,12 @@ +# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8) + +# The loopback interface +auto lo +iface lo inet loopback + +# Wired interface +auto eth0 +iface eth0 inet static +address 192.168.2.1 +netmask 255.255.255.0 + diff --git a/recipes/multitech/config/passwd b/recipes/multitech/config/passwd new file mode 100644 index 0000000000..2dea53f23e --- /dev/null +++ b/recipes/multitech/config/passwd @@ -0,0 +1,18 @@ +root:zFiVnQRfb1qvQ:0:0:root:/home/root:/bin/bash +daemon:*:1:1:daemon:/usr/sbin:/bin/sh +bin:*:2:2:bin:/bin:/bin/sh +sys:*:3:3:sys:/dev:/bin/sh +sync:*:4:65534:sync:/bin:/bin/sync +games:*:5:60:games:/usr/games:/bin/sh +man:*:6:12:man:/var/cache/man:/bin/sh +lp:*:7:7:lp:/var/spool/lpd:/bin/sh +mail:*:8:8:mail:/var/mail:/bin/sh +news:*:9:9:news:/var/spool/news:/bin/sh +uucp:*:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:*:13:13:proxy:/bin:/bin/sh +www-data:*:33:33:www-data:/var/www:/bin/sh +backup:*:34:34:backup:/var/backups:/bin/sh +list:*:38:38:Mailing List Manager:/var/list:/bin/sh +irc:*:39:39:ircd:/var/run/ircd:/bin/sh +gnats:*:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:*:65534:65534:nobody:/nonexistent:/bin/sh diff --git a/recipes/multitech/config/ppp/chap-secrets b/recipes/multitech/config/ppp/chap-secrets new file mode 100644 index 0000000000..60efe8f54d --- /dev/null +++ b/recipes/multitech/config/ppp/chap-secrets @@ -0,0 +1,3 @@ +# Secrets for authentication using CHAP +# client server secret IP addresses +* * "" * diff --git a/recipes/multitech/config/ppp/options b/recipes/multitech/config/ppp/options new file mode 100644 index 0000000000..1126510694 --- /dev/null +++ b/recipes/multitech/config/ppp/options @@ -0,0 +1,17 @@ +# Select tty device +# +# MTSMC-E +/dev/ttyS1 +# MTSMC-H +#/dev/ttyACM0 +# USB device +#/dev/ttyUSB0 + +# Uncomment below to run in foreground +#nodetach + +# Uncomment below to emit debug +#debug + +lock + diff --git a/recipes/multitech/config/ppp/pap-secrets b/recipes/multitech/config/ppp/pap-secrets new file mode 100644 index 0000000000..f782b4a874 --- /dev/null +++ b/recipes/multitech/config/ppp/pap-secrets @@ -0,0 +1,3 @@ +# Secrets for authentication using PAP +# client server secret IP addresses +* * "" * diff --git a/recipes/multitech/config/ppp/peers/cdma b/recipes/multitech/config/ppp/peers/cdma new file mode 100644 index 0000000000..3fc231f21f --- /dev/null +++ b/recipes/multitech/config/ppp/peers/cdma @@ -0,0 +1,9 @@ +linkname ppp0 +230400 +defaultroute +replacedefaultroute +usepeerdns +noauth +crtscts +novj +connect '/usr/sbin/chat -v -t 90 -f /etc/ppp/peers/cdma_chat' diff --git a/recipes/multitech/config/ppp/peers/cdma_chat b/recipes/multitech/config/ppp/peers/cdma_chat new file mode 100644 index 0000000000..6ff750e24a --- /dev/null +++ b/recipes/multitech/config/ppp/peers/cdma_chat @@ -0,0 +1,18 @@ +SAY "CDMA chat\n" +ECHO OFF +ABORT 'NO DIAL TONE' +ABORT 'NO DIALTONE' +ABORT 'NO ANSWER' +ABORT 'NO CARRIER' +ABORT 'DELAYED' +ABORT 'VOICE' +ABORT 'BUSY' +'' 'AT' +OK 'ATZ' +OK 'AT+CSQ' +SAY "Dialing...\n" +OK 'ATD#777' +SAY "Waiting for CONNECT...\n" +TIMEOUT 120 +CONNECT '' +SAY "Connected\n" diff --git a/recipes/multitech/config/ppp/peers/gsm b/recipes/multitech/config/ppp/peers/gsm new file mode 100644 index 0000000000..fed62a34b5 --- /dev/null +++ b/recipes/multitech/config/ppp/peers/gsm @@ -0,0 +1,10 @@ +linkname ppp0 +230400 +defaultroute +replacedefaultroute +usepeerdns +ipcp-max-failure 4 +noauth +crtscts +novj +connect '/usr/sbin/chat -v -t 90 -f /etc/ppp/peers/gsm_chat' diff --git a/recipes/multitech/config/ppp/peers/gsm_chat b/recipes/multitech/config/ppp/peers/gsm_chat new file mode 100644 index 0000000000..88877775bb --- /dev/null +++ b/recipes/multitech/config/ppp/peers/gsm_chat @@ -0,0 +1,23 @@ +SAY "GSM chat\n" +ECHO OFF +ABORT 'NO DIAL TONE' +ABORT 'NO DIALTONE' +ABORT 'NO ANSWER' +ABORT 'NO CARRIER' +ABORT 'DELAYED' +ABORT 'VOICE' +ABORT 'BUSY' +'' 'AT' +OK 'ATZ' +OK 'AT+CSQ' +#OK 'AT+CGDCONT=1,"IP","proxy"' +#OK 'AT+CGDCONT=1,"IP","ISP.CINGULAR"' +#OK 'AT+CGDCONT=1,"IP","internet2.voicestream.com"' +OK 'AT+CGDCONT=1,"IP","internet"' +SAY "Dialing...\n" +#OK 'ATD*99#' +OK 'ATD*99***1#' +SAY "Waiting for CONNECT...\n" +TIMEOUT 120 +CONNECT '' +SAY "Connected\n" |