defect 2954181: add code logic to handle the case that new dhcpd which does not write the *.info file
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5287 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
23311952f0
commit
5921efb1a6
@ -136,6 +136,21 @@ if [ $downloaded -eq 0 ]; then
|
||||
if [ $? -eq 0 ]; then
|
||||
downloaded=1
|
||||
fi
|
||||
elif [ -x "/sbin/dhcpcd" ]; then
|
||||
# New dhcpcd doesn't creates *.info files.
|
||||
for lease in $(ls "/var/lib/dhcpcd/"); do
|
||||
iface="$(echo "$lease" | sed -n -e 's/^dhcpcd-\(.*\)\.lease$/\1/p')"
|
||||
if [ -n "$iface" ]; then
|
||||
SIP="$(dhcpcd -q -T "$iface" | sed -n -e '/new_dhcp_server_identifier/ s/.*=//p')"
|
||||
if [ -n "$SIP" ]; then
|
||||
download_postscripts $SIP
|
||||
if [ $? -eq 0 ]; then
|
||||
downloaded=1
|
||||
break
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user