Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/postinstall Handle obsolete xen/pae-xen kernel modu...



details:   https://anonhg.NetBSD.org/src/rev/9e1044d7a0b3
branches:  trunk
changeset: 804817:9e1044d7a0b3
user:      uebayasi <uebayasi%NetBSD.org@localhost>
date:      Mon Dec 01 02:08:34 2014 +0000

description:
Handle obsolete xen/pae-xen kernel modules; reported by John D. Baker.

diffstat:

 usr.sbin/postinstall/postinstall |  14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diffs (44 lines):

diff -r 67a07acae9fc -r 9e1044d7a0b3 usr.sbin/postinstall/postinstall
--- a/usr.sbin/postinstall/postinstall  Mon Dec 01 01:34:30 2014 +0000
+++ b/usr.sbin/postinstall/postinstall  Mon Dec 01 02:08:34 2014 +0000
@@ -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 @@
        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 @@
        | 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 @@
        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}



Home | Main Index | Thread Index | Old Index