What's new

script missing line after reboot....

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

alienx2

Regular Contributor
im having problem with post-mount script. every reboot, it can run some lines but others lines are missing.

Code:
#!/bin/sh

if [ $1 = "/tmp/mnt/TOSHIBA" ]
then
  ln -nsf $1/entware /tmp/opt
fi

ln -s /tmp/mnt/TOSHIBA/entware/lib/python2.7/site-packages/pytz/zoneinfo/Asia/Manila /etc/localtime
sleep 5
service restart_dnsmasq
sleep 5
/opt/etc/init.d/S81aria2 start
/opt/etc/init.d/S75nzbget start
sleep 10
/opt/etc/init.d/S98headphones start
sleep 10
/opt/etc/init.d/S96sickbeard start
sleep 10
/opt/etc/init.d/S95nzbhydra start
sleep 10
swapon /opt/swap

sleep 12
wget -qO- "http://winhelp2002.mvps.org/hosts.txt" "http://someonewhocares.org/hosts/zero/hosts" "http://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=0&startdate[day]=&startdate[month]=&startdate[year]=&mimetype=plaintext&useip=0.0.0.0" | grep -w ^0.0.0.0 | sed $'s/\r$//' | sort -u > /tmp/mnt/TOSHIBA/Download/settings/DNS/hosts.clean
sleep 5
service restart_dnsmasq

but missing lines:
Code:
/opt/etc/init.d/S98headphones start
/opt/etc/init.d/S96sickbeard start
/opt/etc/init.d/S95nzbhydra start
 
What do you mean with missing lines? commands are not executed?
First, move "swapon /opt/swap" right after "fi"
ln -nsf $1/entware /tmp/opt
fi
swapon /opt/swap
ln -s /tmp/mnt/TOSHIBA/entware/lib/python2.7/site-packages/pytz/zoneinfo/Asia/Manila /etc/localtime

Also try to log commands
logger -st "$0" "Starting headphones..."
/opt/etc/init.d/S98headphones start
sleep 10
logger -st "$0" "Starting sickbeard..."
/opt/etc/init.d/S96sickbeard start
sleep 10
logger -st "$0" "Starting nzbhydra..."
/opt/etc/init.d/S95nzbhydra start
Then look at router syslog
 
here:

Code:
Jan 26 16:39:26 dnsmasq[1204]: read /etc/hosts - 5 addresses
Jan 26 16:39:29 dnsmasq[1204]: read /tmp/mnt/TOSHIBA/Download/settings/DNS/hosts_manual.blocked - 78 addresses
Jan 26 16:39:29 dnsmasq[1204]: read /tmp/mnt/TOSHIBA/Download/settings/DNS/hosts.clean - 25432 addresses
Jan 26 16:39:29 dnsmasq[1204]: read /etc/hosts.dnsmasq - 7 addresses
Jan 26 16:39:29 dnsmasq-dhcp[1204]: read /etc/ethers - 9 addresses
Jan 26 16:39:29 dnsmasq[1204]: using nameserver 208.67.222.222#53 for domain local
Jan 26 16:39:29 dnsmasq[1204]: using nameserver 8.8.8.8#53 for domain local
Jan 26 16:39:29 dnsmasq[1204]: using nameserver 8.8.4.4#53
Jan 26 16:39:29 dnsmasq[1204]: using nameserver 8.8.8.8#53
Jan 26 16:39:29 dnsmasq[1204]: using nameserver 84.200.70.40#53
Jan 26 16:39:29 dnsmasq[1204]: using nameserver 84.200.69.80#53
Jan 26 16:39:29 dnsmasq[1204]: using local addresses only for domain nas
Jan 26 16:39:29 dnsmasq[1204]: using nameserver 8.8.8.8#53
Jan 26 16:39:29 dnsmasq[1204]: using nameserver 208.67.222.222#53
Jan 26 16:39:31 /jffs/scripts/post-mount: Starting Aria2...
Jan 26 16:39:31 /jffs/scripts/post-mount: Starting NZBGet...
Jan 26 16:39:44 /jffs/scripts/post-mount: Starting headphones...

it didnt run well... but manual type run working fine.

in /opt/etc/init.d/S98headphones:
Code:
PATH=/opt/bin:/opt/sbin:$PATH
/opt/bin/python /opt/etc/headphones/Headphones.py -d
 
now its problem solved. i found theres no "#!/bin/sh" in S98headphones.. sorry i forgot to put...
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top