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 :
DbVisualizer 6.5.2
The Universal Database Tool
PhpMyAdmin 3.1.2 rc1
Php front-end to MySQL administration
Xine 1.1.6
Free video player
Glade 3.5.5
User interface builder for GTK+ and Gnome
Evolution 2.25.4
GNOME mailer, calendar, contact manager and communications tool
GEdit 2.25.4
Small but powerful text editor
LimeWire 5.0.4
Gnutella Client
WebGUI 7.6.8
A fully featured content management system.
GTK2 2.14.7
GUI Toolkit
Brasero 0.9.0
Application to burn CD/DVD
Free IT Magazines, White Papers, eBooks, and more !
Dr. Dobb's Journal

Dr. Dobb's Journal enables programmers to write the most efficient and sophisticated programs and help in daily programming quandaries.

The 7 Things that IT Security Professionals MUST KNOW!

Gain key insight into security problem and find the safest means to protect your technological assets.

Database Trends and Applications

Provides timely coverage of the technology, intelligence and insight needed to plan, implement and manage information-rich projects.

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