Module Name: src Committed By: martin Date: Mon Apr 11 20:29:50 UTC 2011
Modified Files: src/usr.sbin/postinstall: postinstall Log Message: Add a new check to populate /var/chroot/tcpdump/etc To generate a diff of this commit: cvs rdiff -u -r1.115 -r1.116 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.115 src/usr.sbin/postinstall/postinstall:1.116 --- src/usr.sbin/postinstall/postinstall:1.115 Sat Mar 12 23:04:16 2011 +++ src/usr.sbin/postinstall/postinstall Mon Apr 11 20:29:50 2011 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: postinstall,v 1.115 2011/03/12 23:04:16 erh Exp $ +# $NetBSD: postinstall,v 1.116 2011/04/11 20:29:50 martin Exp $ # # Copyright (c) 2002-2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -1465,6 +1465,29 @@ # +# tcpdumpchroot +# +additem tcpdumpchroot "make sure /var/chroot/tcpdump/etc is populated" +do_tcpdumpchroot() +{ + [ -n "$1" ] || err 3 "USAGE: do_tcpdumpchroot fix|check" + + failed=0; + 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 + failed=$(( ${failed} + $? )) + else + failed=1 + fi + fi + return ${failed} +} + + +# # obsolete # (this item is last to allow other items to move obsolete files) #