rc.network_basic 1.0 KB

123456789101112131415161718192021222324
  1. #!/bin/sh
  2. #echo "Setting up interface lo..."
  3. ifconfig lo 127.0.0.1
  4. route add -net 127.0.0.0 netmask 255.0.0.0 lo
  5. #begin rerwin
  6. if [ -f /root/.dhcpcd.duid ];then #Using a DUID in client ID
  7. #If running from pup_save file and no common DHCP Unique Identifier (DUID) present and partition has a full-install or partition-save and a duid file, make that file the common duid.
  8. [ ! -s /mnt/home/.common.duid -a ! "`ls -l /mnt/home | cut -f 11 -d ' '`" = "/" -a -s /mnt/home/root/.dhcpcd.duid ] && cp /mnt/home/root/.dhcpcd.duid /mnt/home/.common.duid
  9. #Ensure that any local duid matches the common duid or will force new duid.
  10. [ -s /mnt/home/.common.duid ] && cp /mnt/home/.common.duid /root/.dhcpcd.duid || cp /dev/null /root/.dhcpcd.duid
  11. if [ -s /root/.dhcpcd.duid ];then #duid info for DHCP request.
  12. [ ! -d /var/lib/dhcpcd ] && mkdir /var/lib/dhcpcd
  13. cp /root/.dhcpcd.duid /var/lib/dhcpcd/dhcpcd.duid
  14. else #Force new DUID
  15. [ -f /var/lib/dhcpcd/dhcpcd.duid ] && rm /var/lib/dhcpcd/dhcpcd.duid
  16. fi
  17. fi
  18. #end rerwin
  19. ###END###