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 ...

Get Solaris™ Operating Environment Boot Camp now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.