File: plip

package info (click to toggle)
netenv 0.82-10
  • links: PTS
  • area: main
  • in suites: potato
  • size: 160 kB
  • ctags: 40
  • sloc: sh: 337; ansic: 136; makefile: 52
file content (42 lines) | stat: -rwxr-xr-x 1,163 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/sh
#******************************************************************
#ident /etc/init.d/plip Time-stamp: <97/08/15 10:23:01 bav>
#******************************************************************
#                           Gerd Bavendiek  bav@rw.sni.de  97-05-00
#
# This script is used to start/stop the plip-Interface. This is done
# depending on the current setting of the variable PLIP_START, which
# is expected to be defined in the file /etc/netenv/netenv. See the
# README.netenv for further information.
#-------------------------------------------------------------------

PATH=/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin

set -e

if [ -r /etc/netenv/netenv ]; then
   . /etc/netenv/netenv
fi

case "$1" in
  start)
	 if [ "$PLIP_START" = "yes" ]; then	
	    if /sbin/lsmod | grep '^lp' ; then
	       /sbin/rmmod lp
	    fi
	    echo "Starting plip-interface plip1 ..."
	    ifconfig plip1 $PLIP_IPADDR pointopoint $PLIP_PARTNER up    
	    route add $PLIP_PARTNER && echo "done"      
	 fi	
	 ;;
   stop)
	 ifconfig plip1 down
	 /sbin/rmmod plip 
	 ;;
  *)
     echo "Usage: /etc/init.d/plip {start|stop}"
     exit 1
     ;;
esac

exit 0