Module Name: src
Committed By: roy
Date: Sat Apr 1 20:14:53 UTC 2017
Modified Files:
src/usr.sbin/postinstall: postinstall
Log Message:
Move dhcpcd lease files to new location.
To generate a diff of this commit:
cvs rdiff -u -r1.212 -r1.213 src/usr.sbin/postinstall/postinstall
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/postinstall/postinstall
diff -u src/usr.sbin/postinstall/postinstall:1.212 src/usr.sbin/postinstall/postinstall:1.213
--- src/usr.sbin/postinstall/postinstall:1.212 Sat Apr 1 20:03:31 2017
+++ src/usr.sbin/postinstall/postinstall Sat Apr 1 20:14:53 2017
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: postinstall,v 1.212 2017/04/01 20:03:31 roy Exp $
+# $NetBSD: postinstall,v 1.213 2017/04/01 20:14:53 roy Exp $
#
# Copyright (c) 2002-2015 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -909,6 +909,14 @@ do_dhcpcd()
"${DEST_DIR}/var/db/dhcpcd/rdm_monotonic"
failed=$(( ${failed} + $? ))
+ for lease in "${DEST_DIR}/var/db/dhcpcd-"*.lease*; do
+ [ -f "${lease}" ] || continue
+ new_lease=$(basename "${lease}" | ${SED} -e 's/dhcpcd-//')
+ new_lease="${DEST_DIR}/var/db/dhcpcd/${new_lease}"
+ move_file "${op}" "${lease}" "${new_lease}"
+ failed=$(( ${failed} + $? ))
+ done
+
return ${failed}
}