O'Reilly logo

Solaris™ Operating Environment Boot Camp by Dominic Butler, David Rhodes

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Custom Scripts

We now have an interface that will connect into the ISP automatically and hang up after a predefined time period. This is great, although some users prefer to control the dialup and timeout processes themselves. To do this, we'll create a few short scripts: startPPP to initialize the connection and keep it open, and stopPPP to terminate the link.

Let's first look at how we start it:

 cesium# cat startPPP #!/bin/ksh # # script to initiate the PPP link # remoteMachine="remote-ppp" # the remote entry in hosts sleepTimer=250 # must be less than ppp timeout pidFile=/tmp/startPPP.pid # # check PPP is not already running # if [ -f ${pidFile} ]; then thePid=$(cat ${pidFile}) pidStat=$(ps –p ${thePid} | grep –v PID | wc –l | awk '{ print ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required