Module Name: src Committed By: martin Date: Sun Apr 17 13:16:59 UTC 2011
Modified Files: src/usr.sbin/postinstall: postinstall Log Message: Invert the chroot/tcpdump/etc test and make it remove the (not needed anymore) directory. To generate a diff of this commit: cvs rdiff -u -r1.116 -r1.117 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.116 src/usr.sbin/postinstall/postinstall:1.117 --- src/usr.sbin/postinstall/postinstall:1.116 Mon Apr 11 20:29:50 2011 +++ src/usr.sbin/postinstall/postinstall Sun Apr 17 13:16:59 2011 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: postinstall,v 1.116 2011/04/11 20:29:50 martin Exp $ +# $NetBSD: postinstall,v 1.117 2011/04/17 13:16:59 martin Exp $ # # Copyright (c) 2002-2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -1467,17 +1467,17 @@ # # tcpdumpchroot # -additem tcpdumpchroot "make sure /var/chroot/tcpdump/etc is populated" +additem tcpdumpchroot "remove /var/chroot/tcpdump/etc/protocols" do_tcpdumpchroot() { [ -n "$1" ] || err 3 "USAGE: do_tcpdumpchroot fix|check" failed=0; - if [ ! -r ${DEST_DIR}/var/chroot/tcpdump/etc/protocols ]; then + if [ -r ${DEST_DIR}/var/chroot/tcpdump/etc/protocols ]; then if [ "$1" = "fix" ]; then - mkdir -p ${DEST_DIR}/var/chroot/tcpdump/etc - cp ${SRC_DIR}/etc/protocols \ - ${DEST_DIR}/var/chroot/tcpdump/etc + rm ${DEST_DIR}/var/chroot/tcpdump/etc/protocols + failed=$(( ${failed} + $? )) + rmdir ${DEST_DIR}/var/chroot/tcpdump/etc failed=$(( ${failed} + $? )) else failed=1