Since they are executed serially...
Code:pc_replace "invalid users =" "inxalid users =" $CONFIG pc_replace "valid users =" "# valid users =" $CONFIG pc_replace "inxalid users =" "invalid users =" $CONFIG
Can you post the final file?I would say back to sed.
I'll be back tomorrow. Gotta wake up tomorrow morning.
Thanks you very much, in the meanwhile.
#!/bin/sh
logger -t $(basename $0) $1
CONFIG=$1
source /usr/sbin/helper.sh
pc_insert "[MEDIA" "guest ok = yes" $CONFIG
pc_replace "invalid users =" "inxalid users =" $CONFIG
pc_replace "valid users =" "# valid users =" $CONFIG
pc_replace "inxalid users =" "invalid users =" $CONFIG
chmod a+rx /jffs/scripts/*
#!/bin/sh
logger -t $(basename $0) $1
CONFIG=$1
source /usr/sbin/helper.sh
sed -i 's/^valid users/#valid users/' $CONFIG
pc_insert "[MEDIA" "guest ok = yes" $CONFIG # Repeat this line for each share you want to give guest access
smb://username@RT-N66U/Media
Welcome To SNBForums
SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.
If you'd like to post a question, simply register and have at it!
While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!