Module Name: src Committed By: martin Date: Fri Jan 17 19:06:57 UTC 2014
Modified Files: src/usr.sbin/postinstall: postinstall Log Message: Add a check to remove the temporarily (eroneously) created /@RUNDIR@ (PR bin/48529) To generate a diff of this commit: cvs rdiff -u -r1.161 -r1.162 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.161 src/usr.sbin/postinstall/postinstall:1.162 --- src/usr.sbin/postinstall/postinstall:1.161 Tue Dec 17 12:51:26 2013 +++ src/usr.sbin/postinstall/postinstall Fri Jan 17 19:06:57 2014 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: postinstall,v 1.161 2013/12/17 12:51:26 njoly Exp $ +# $NetBSD: postinstall,v 1.162 2014/01/17 19:06:57 martin Exp $ # # Copyright (c) 2002-2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -796,6 +796,30 @@ do_dhcpcd() } # +# dhcpcdrundir +# +additem dhcpcdrundir "accientaly created /@RUNDIR@ does not exist" +do_dhcpcdrundir() +{ + [ -n "$1" ] || err 3 "USAGE: do_dhcpcdrundir fix|check" + op="$1" + failed=0 + + if [ -d /@RUNDIR@ ]; then + if [ "${op}" = "check" ]; then + msg "Remove eroneously created /@RUNDIR@" + failed=1 + elif ! eval "rm -r /@RUNDIR@"; then + msg "Failed to remove /@RUNDIR@" + failed=1 + else + msg "Removed eroneously created /@RUNDIR@" + fi + fi + return ${failed} +} + +# # envsys # additem envsys "envsys configuration is up to date"