F
# mount
/dev/root on / type squashfs (ro)
proc on /proc type proc (rw)
ramfs on /var type ramfs (rw)
/dev/mtdblock5 on /data type jffs2 (rw)
usbfs on /proc/bus/usb type usbfs (rw)
sysfs on /var/sysfs type sysfs (rw)
/dev/sda1 on /var/media/ftp/USBMassStorageDevice-Partition-0-1 type vfat (rw,uid=1000,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1)
cd /var/tmp
cat /var/flash/debug.cfg > debug.cfg
cat /var/tmp/debug.cfg > /var/flash/debug.cfg
Das wäre interessant. Ich hab jetzt mal ein paar Sachen im Schnelldurchlauf durch von ctlmgr bis telefon. Hab auch mal paar SIGHUPs gesendet ohne Erfolg. Rumstochern bringt da nicht viel. Man müsste den Reboot auseinandernehmen (strace), bzw. es ist irgendwo in der rc.S.T_H schrieb:Die Frage ist nur: welcher Prozess verwaltet das Telefonbuch?
#!/bin/sh
PASSW="$1"
ENTRY="$2"
NAME="$3"
NUMBER1="$4"
NUMBER2="$5"
NUMBER3="$6"
export REQUEST_METHOD="POST"
export REMOTE_ADDR="127.0.0.1"
export CONTENT_TYPE="application/x-www-form-urlencoded"
POST_DATA="login:command/password=$PASSW"
export CONTENT_LENGTH=${#POST_DATA}
echo -n "$POST_DATA" | /usr/www/html/cgi-bin/webcm > /dev/null
export REQUEST_METHOD="GET"
export REMOTE_ADDR="127.0.0.1"
export QUERY_STRING="getpage=../html/de/menus/menu2.html&var:lang=de&var:menu=fon&var:pagename=fonbuch2&var:PhonebookEntryNew=Entry$ENTRY"
cd /usr/www/html/cgi-bin
./webcm > /dev/null
if [ "$NUMBER1" != "" ]; then
POST_NO1="telcfg:settings/Phonebook/Entry$ENTRY/Number0/Code=&telcfg:settings/Phonebook/Entry$ENTRY/Number0/Number=$NUMBER1&telcfg:settings/Phonebook/Entry$ENTRY/Number0/Type=home";
else
POST_NO1="telcfg:settings/Phonebook/Entry$ENTRY/Number0/Code=&telcfg:settings/Phonebook/Entry$ENTRY/Number0/Number=&telcfg:settings/Phonebook/Entry$ENTRY/Number0/Type=";
fi
if [ "$NUMBER2" != "" ]; then
POST_NO2="telcfg:settings/Phonebook/Entry$ENTRY/Number1/Code=&telcfg:settings/Phonebook/Entry$ENTRY/Number1/Number=$NUMBER2&telcfg:settings/Phonebook/Entry$ENTRY/Number1/Type=mobile";
else
POST_NO2="telcfg:settings/Phonebook/Entry$ENTRY/Number1/Code=&telcfg:settings/Phonebook/Entry$ENTRY/Number1/Number=&telcfg:settings/Phonebook/Entry$ENTRY/Number1/Type=";
fi
if [ "$NUMBER3" != "" ]; then
POST_NO3="telcfg:settings/Phonebook/Entry$ENTRY/Number2/Code=&telcfg:settings/Phonebook/Entry$ENTRY/Number2/Number=$NUMBER3&telcfg:settings/Phonebook/Entry$ENTRY/Number2/Type=work";
else
POST_NO3="telcfg:settings/Phonebook/Entry$ENTRY/Number2/Code=&telcfg:settings/Phonebook/Entry$ENTRY/Number2/Number=&telcfg:settings/Phonebook/Entry$ENTRY/Number2/Type=";
fi
POST_DATA="telcfg:settings/Phonebook/Entry$ENTRY/Name=$NAME&telcfg:settings/Phonebook/Entry$ENTRY/DefaultNumber=0&$POST_NO1&$POST_NO2&$POST_NO3"
export CONTENT_LENGTH=${#POST_DATA}
export REQUEST_METHOD="POST"
export REMOTE_ADDR="127.0.0.1"
echo -n "$POST_DATA" | /usr/www/html/cgi-bin/webcm > /dev/null
# usage:
./avm_pb.sh "<webif-passwd>" "<id 0-xx?>" "<name>" "<nummer1>" "<nummer2>" "<nummer3>"
# z.B. 1. Eintrag bearbeiten / neu anlegen:
./avm_pb.sh "passwort" "0" "Ein Name" "12345"
Apr 12 14:16:32 webcm[1298]: Got group error |Kurzwahl schon vergeben!|
cat /var/flash/phonebook > /var/tmp/phonebook
cat /var/tmp/phonebook > /var/flash/phonebook
reboot
./avm_pb.sh "xxx" "0" "ZZZ Neuer Name 1" "1111"
./avm_pb.sh "xxx" "0" "ZZZ Neuer Name 2" "2222"
./avm_pb.sh "xxx" [COLOR="Red"]"0"[/COLOR] "ZZZ Neuer Name 1" "1111"
./avm_pb.sh "xxx" [COLOR="Red"]"1"[/COLOR] "ZZZ Neuer Name 2" "2222"