Module Name: src Committed By: uebayasi Date: Mon Dec 1 02:08:34 UTC 2014
Modified Files: src/usr.sbin/postinstall: postinstall Log Message: Handle obsolete xen/pae-xen kernel modules; reported by John D. Baker. To generate a diff of this commit: cvs rdiff -u -r1.183 -r1.184 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.183 src/usr.sbin/postinstall/postinstall:1.184 --- src/usr.sbin/postinstall/postinstall:1.183 Wed Nov 12 19:41:24 2014 +++ src/usr.sbin/postinstall/postinstall Mon Dec 1 02:08:34 2014 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: postinstall,v 1.183 2014/11/12 19:41:24 apb Exp $ +# $NetBSD: postinstall,v 1.184 2014/12/01 02:08:34 uebayasi Exp $ # # Copyright (c) 2002-2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -641,7 +641,7 @@ obsolete_stand() local dir="$1" local subdir - if ! [ -d "${DEST_DIR}/${dir}" ]; then + if ! [ -d "${DEST_DIR}${dir}" ]; then msg "${DEST_DIR}${dir} doesn't exist; can't check for obsolete files" return 1 fi @@ -652,7 +652,7 @@ obsolete_stand() | tail -n +2 \ | while read subdir ; do subdir="${subdir%/.}" - find "${DEST_DIR}/${dir#/}/${subdir}" -depth -print + find "${DEST_DIR}${dir}/${subdir}" -depth -print done \ | unprefix "${DEST_DIR}" } @@ -2008,7 +2008,13 @@ do_obsolete_stand() op="$1" failed=0 - obsolete_stand "/stand/${MACHINE}" | obsolete_paths "${op}" + for dir in \ + /stand/${MACHINE} \ + /stand/${MACHINE}-xen \ + /stand/${MACHINE}pae-xen + do + [ -d "${DESTDIR}${dir}" ] && obsolete_stand "${dir}" + done | obsolete_paths "${op}" failed=$(( ${failed} + $? )) return ${failed}