route script to load at startup

snutteb

Vu+ Newbie
Hi i try to make a route script to load at startup.

Anybody that knows how to??
i used
/etc/init.d/local
put in
#!/bin/bash and tryed #!/bin/sh

/sbin/route add 95.143.192.62 reject

and
run "update-rc.d local defaults" in telnet

but the route command is not relooded after reboot
 
You can try to start your script from /etc/init.d/bootmisc.sh

add like this in bootmisc.sh

if [ -x /usr/bin/name ]; then
/usr/bin/name
fi

=================

Of course if you make a mistake,
you can break the image.
 
You can try to start your script from /etc/init.d/bootmisc.sh

add like this in bootmisc.sh

if [ -x /usr/bin/name ]; then
/usr/bin/name
fi

=================

Of course if you make a mistake,
you can break the image.


thx but i dont really understand???

where do i put my list of route commands like

route add 95.143.192.62 reject
 
I think you have to make script with your command with name.sh
put script file in to /user/bin
chmod 755 script file

example :

script file with name route.sh you have to chmod 755

add like this in bootmisc.sh

if [ -x /usr/bin/route.sh ]; then
/usr/bin/route.sh
fi
 
I think you have to make script with your command with name.sh
put script file in to /user/bin
chmod 755 script file

example :

script file with name route.sh you have to chmod 755

add like this in bootmisc.sh

if [ -x /usr/bin/route.sh ]; then
/usr/bin/route.sh
fi



ok thx where in bootmisc.sh shall i put it??
 
hi again i dont get it start at reboot????

i wrote like this in bootmisc.sh

read TIMESTAMP < /etc/timestamp
if [ ${TIMESTAMP} -gt $SYSTEMDATE ]; then
date -u ${TIMESTAMP#????}${TIMESTAMP%????????}
test -x /etc/init.d/hwclock.sh && /etc/init.d/hwclock.sh stop
fi
fi

#Black Hole
if [ -e "/bin/bh_parallel_mount" ]; then
/bin/bh_parallel_mount
fi

/usr/sbin/crond -c /etc/bhcron/

[ -e "/usr/bin/.Bhautoswap" ] && /usr/bin/.Bhautoswap
# end: if [ -x /usr/bin/route.sh ]; then
/usr/bin/route.sh
fi
exit 0

is this right place in bootmisc??

and if i run /usr/bin/route.sh in telnet it run my commands in the route file.
 
I run my script from here

#
# Update /etc/motd.
#
if test "$EDITMOTD" != no
then
uname -a > /etc/motd.tmp
sed 1d /etc/motd >> /etc/motd.tmp
mv /etc/motd.tmp /etc/motd
fi

if [ -x /usr/bin/myscript ]; then
/usr/bin/myscript
fi


#
# This is as good a place as any for a sanity check
 
Back
Top