IceWalkers.com - Linux Software downloads and news
Name : Password :
Linux SoftwareLinux RPMLinux HowtosLink UsAboutAdvertise

PLIP Install HOWTO

Search Howtos :Match :
Next Previous Contents

19. Install the plip interface permanently

19.1 On the source side

I use an old Linux RedHat 4.1 distribution. The location of the files can be different on other GNU/Linux distributions but the philosophy is the same (The Unix System V convention).

Create the file /etc/rc.d/init.d/plip with this content:

#!/bin/sh

##############################
# file /etc/rc.d/init.d/plip #
##############################

# See how we were called.
case "$1" in
  start)
        # Start daemons.
        /bin/echo "Starting plip interface: "
        /bin/echo "Doing /sbin/ifconfig plip0 source pointopoint target netmask 255.255.255.255 up"
        /sbin/ifconfig plip0 source pointopoint target netmask 255.255.255.255 up
        /bin/echo  "Doing /bin/ping -q -c 4 target"
        /bin/ping -q -c 4 target
        /bin/echo "Starting plip interface: done"
        ;;
  stop)
        # Stop daemons.
        /bin/echo  "Shutting down plip interface:"
        /bin/echo  "Doing /sbin/ifconfig plip0 source pointopoint target netmask 255.255.255.255 down"
        /sbin/ifconfig plip0 source pointopoint target netmask 255.255.255.255 down
        /bin/echo  "Doing /sbin/modprobe  -r plip "
        /sbin/modprobe  -r plip
        /bin/echo "Shutting down plip interface: done"
        ;;
  *)
        echo "Usage: $0 {start|stop}"
        exit 1
esac

exit 0

# === End of File ===

    

Only the ifconfig lines are strictly necessary. Perhaps you will need to add some modprobe commands if you don't use kerneld or the kmod feature of new kernels 2.2.x

Create the symbolic links in the rc*.d directories:

      
      $ cd /etc/rc.d/rc0.d/
      $ ln -s ../init.d/plip K97plip
      
      $ cd /etc/rc.d/rc1.d/
      $ ln -s ../init.d/plip K92plip
      
      $ cd /etc/rc.d/rc3.d/
      $ ln -s ../init.d/plip S11plip


      $ cd /etc/rc.d/rc5.d/
      $ ln -s ../init.d/plip S11plip
     

You can choose other numbers. Make sure that the two-digit number after 'K' is greater than the number of every other file that stops a service depending on plip.

Make sure that the two-digit number after 'S' is less than the number of every other file that start a service depending on plip: nfs, nis, ftp, http etc.

Update the /etc/conf.modules file, choosing the correct IRQ number (7 is mine, yours may be different):

# /etc/conf.modules
...
alias parport_lowlevel parport_pc
post-install parport_pc echo 7 >  /proc/parport/0/irq
...
     

Test the plip shell:

      $ /etc/rc.d/init.d/plip 
      Usage: /etc/rc.d/init.d/plip {start|stop}

      $ /etc/rc.d/init.d/plip stop
      Shutting down plip interface: 
      Doing /sbin/ifconfig plip0 source pointopoint target netmask 255.255.255.255 down 
      Doing /sbin/modprobe  -r plip 
      Shutting down plip interface: done

      $ /etc/rc.d/init.d/plip start
      Starting plip interface: 
      Doing /sbin/ifconfig plip0 source pointopoint target netmask 255.255.255.255 up 
      Doing /bin/ping -q -c 4 target
      PING target (192.168.0.1): 56 data bytes
      
      --- target ping statistics ---
      4 packets transmitted, 4 packets received, 0% packet loss
      round-trip min/avg/max = 4.4/8.3/14.0 ms
      Starting plip interface: done
     

Updating the start scripts is a good occasion to reboot a Unix system, to check the modifications. Do it:

      $ init 6 # or "shutdown -r now" or "reboot"
     

19.2 On the target side

Update the file /etc/init.d/network:

      #! /bin/sh
      #######################
      # /etc/init.d/network #
      #######################

      ifconfig lo 127.0.0.1
      route add -net 127.0.0.0
      
      ifconfig plip1 192.168.0.1 pointopoint 192.168.0.2 netmask 255.255.255.255 up
      route add -host 192.168.0.2 dev plip1
     

That's all because the parport features are directly in the kernel.

Updating the start scripts is a good occasion to reboot a Unix system, to check the modifications. Do it:

      $ init 6
     


Next Previous Contents
Search Howtos :Match :
My Money 2.0.49
Personal financial software
Linux Kernel 2.6 2.6.32-rc8
Linux Kernel
GCstar 1.5.0
Personal collections manager
ImageMagick 6.5.7.9
ImageMagick image processing studio
BibleTime 2.4
Bible study software for Linux / KDE
PHP 5.3.1
Server-side, cross-platform, HTML embedded scripting language.
LFTP 4.0.4
Shell-like command line ftp client.
Tellico 2.1.1
Collection manager for books, music, videos, and bibliographies
Totem 2.28.4
Movie player for Gnome
GNOME 2.29.2
GNOME desktop environment
Free IT Magazines, White Papers, eBooks, and more !
Oracle Magazine

Contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more.

Vulnerability Management for Dummies

Get all the Facts and See How to Implement a Successful Vulnerability Management Program.

Website Magazine

Has tapped premier talent in the Internet industry for our content and each and every issue will contain practical advice and insights for website owners.

Linux Software Map
Find Linux RPM
Best Rated Linux Software
Most Rated Linux Software
Linux Distributions
Linux Howtos
Quick Survey

Please take our survey and help us improve our website to serve you better.

Thank you.
Linux Software
Linux / IT Resources
Site Resources
Google
Privacy Policy
Contact Us
Submit Software
Advertising info