You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ifup.tun 539B

123456789101112131415161718192021
  1. #!/bin/sh
  2. SCRIPT=$0
  3. INTERFACE=$1
  4. if [ `id -u` != 0 ]; then
  5. echo ""
  6. echo "Enter root password for configuring network interface $INTERFACE"
  7. echo "(To avoid this prompt, make the script $SCRIPT setuid-root)"
  8. /bin/su -c "$SCRIPT $INTERFACE" || exit 1
  9. exit 0
  10. fi
  11. /sbin/ifconfig $INTERFACE 10.254.254.2 netmask 255.255.255.252
  12. # Force dhcpd to notice the new network interface
  13. if [ -x /etc/init.d/dhcpd ]; then
  14. /etc/init.d/dhcpd reload # Redhat
  15. elif [ -x /etc/init.d/dhcp ]; then
  16. /etc/init.d/dhcp restart # Debian
  17. fi