akimatsu123
December 27th, 2007, 11:22 AM
hi. i use PPPoE, and i do not want the connection to start at startup. And its a pain to type "pon dsl-provider" and "poff dsl-provider" every time so i wrote a little shell script that looks like this:
echo "start or stop PPPoE? Y=Start N=Stop (y/n)"
read answer
if [ "$answer" = "y" ]; then
pon dsl-provider
plog
fi
if [ "$answer" = "n" ]; then
poff dsl-provider
plog
fi
the "plog" command is in there so that i can make sure the connection was established (ISP is a little glitchy at times with username/password so it doesnt work sometimes)
to execute this i made a launcher with the command (script is called "PPPoE_Toggle")
sudo /home/username/PPPoE_Toggle
except it just flashes the terminal, runs the script, and closes very quickly. So fast that i cannot read the message from the "plog" command.
how do i create a launcher on my desktop that would start the script, and keep the terminal open after it finishes?
the only way i know now is to actually OPEN terminal and type in
/home/username/PPPoE_Toggle
which keeps the ternimal open but then its still a lot of typing and im lazy :P
thanks in advance. sorry for the long post.
echo "start or stop PPPoE? Y=Start N=Stop (y/n)"
read answer
if [ "$answer" = "y" ]; then
pon dsl-provider
plog
fi
if [ "$answer" = "n" ]; then
poff dsl-provider
plog
fi
the "plog" command is in there so that i can make sure the connection was established (ISP is a little glitchy at times with username/password so it doesnt work sometimes)
to execute this i made a launcher with the command (script is called "PPPoE_Toggle")
sudo /home/username/PPPoE_Toggle
except it just flashes the terminal, runs the script, and closes very quickly. So fast that i cannot read the message from the "plog" command.
how do i create a launcher on my desktop that would start the script, and keep the terminal open after it finishes?
the only way i know now is to actually OPEN terminal and type in
/home/username/PPPoE_Toggle
which keeps the ternimal open but then its still a lot of typing and im lazy :P
thanks in advance. sorry for the long post.