123456789101112131415161718192021222324 |
- #!/bin/sh
- #echo "Setting up interface lo..."
- ifconfig lo 127.0.0.1
- route add -net 127.0.0.0 netmask 255.0.0.0 lo
- #begin rerwin
- if [ -f /root/.dhcpcd.duid ];then #Using a DUID in client ID
- #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.
- [ ! -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
- #Ensure that any local duid matches the common duid or will force new duid.
- [ -s /mnt/home/.common.duid ] && cp /mnt/home/.common.duid /root/.dhcpcd.duid || cp /dev/null /root/.dhcpcd.duid
- if [ -s /root/.dhcpcd.duid ];then #duid info for DHCP request.
- [ ! -d /var/lib/dhcpcd ] && mkdir /var/lib/dhcpcd
- cp /root/.dhcpcd.duid /var/lib/dhcpcd/dhcpcd.duid
- else #Force new DUID
- [ -f /var/lib/dhcpcd/dhcpcd.duid ] && rm /var/lib/dhcpcd/dhcpcd.duid
- fi
- fi
- #end rerwin
- ###END###
|