aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/network-functions
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2012-03-09 11:18:10 -0500
committerBill Nottingham <notting@redhat.com>2012-03-09 11:18:10 -0500
commit60b84547c03ec7d82633f3c9d6939af4747a6bff (patch)
tree07c354e96bfc9586b66183c1f9693c5161323867 /sysconfig/network-scripts/network-functions
parent2858dfa0b9b2c56dad8d46d5ff9aabe05a67c870 (diff)
downloadinitscripts-60b84547c03ec7d82633f3c9d6939af4747a6bff.tar
initscripts-60b84547c03ec7d82633f3c9d6939af4747a6bff.tar.gz
initscripts-60b84547c03ec7d82633f3c9d6939af4747a6bff.tar.bz2
initscripts-60b84547c03ec7d82633f3c9d6939af4747a6bff.tar.xz
initscripts-60b84547c03ec7d82633f3c9d6939af4747a6bff.zip
Use NetworkManager-compatible lease file names by default.
Diffstat (limited to 'sysconfig/network-scripts/network-functions')
-rw-r--r--sysconfig/network-scripts/network-functions9
1 files changed, 9 insertions, 0 deletions
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions
index f6d2f05b..6402a7dc 100644
--- a/sysconfig/network-scripts/network-functions
+++ b/sysconfig/network-scripts/network-functions
@@ -59,6 +59,15 @@ get_uuid_by_config ()
dbus-send --system --print-reply --dest=com.redhat.ifcfgrh1 /com/redhat/ifcfgrh1 com.redhat.ifcfgrh1.GetIfcfgDetails string:"/etc/sysconfig/network-scripts/$1" 2>/dev/null | awk -F '"' '/string / { print $2 }'
}
+generate_lease_file_name () {
+ local ver=$1
+ LEASEFILE="/var/lib/dhclient/dhclient$ver-${DEVICE}.leases"
+ if [ -f $LEASEFILE ]; then
+ return
+ fi
+ LEASEFILE="/var/lib/dhclient/dhclient$ver-${UUID}-${DEVICE}.lease"
+}
+
need_config ()
{
local nconfig