Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/etc/security,v rcsdiff: /ftp/cvs/cvsroot/src/etc/security,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.102 retrieving revision 1.103 diff -u -p -r1.102 -r1.103 --- src/etc/security 2007/06/06 13:30:48 1.102 +++ src/etc/security 2007/08/09 07:50:58 1.103 @@ -1,6 +1,6 @@ #!/bin/sh - # -# $NetBSD: security,v 1.102 2007/06/06 13:30:48 martti Exp $ +# $NetBSD: security,v 1.103 2007/08/09 07:50:58 tron Exp $ # from: @(#)security 8.1 (Berkeley) 6/9/93 # @@ -849,13 +849,13 @@ if checkyesno check_disklabels; then migrate_file "$file" "$work_dir/${file##*/}" done - # generate list of old disklabels & fdisks and remove them - ls -1d $work_dir/disklabel.* $work_dir/fdisk.* 2>/dev/null | + # generate list of old disklabels, fdisks & wedges and remove them + ls -1d $work_dir/disklabel.* $work_dir/fdisk.* $work_dir/wedges.* 2>/dev/null | egrep -v '\.(backup|current)(,v)?$' > $LABELS xargs rm < $LABELS - # generate disklabels of all disks excluding: cd fd md st - disks=`iostat -x | awk 'NR > 1 && $1 !~ /^[cfm]d|st|nfs/ { print $1; }'` + # generate disklabels of all disks excluding: cd dk fd md st + disks=`iostat -x | awk 'NR > 1 && $1 !~ /^[cfm]d|dk|st|nfs/ { print $1; }'` for i in $disks; do disklabel $i > "$work_dir/disklabel.$i" 2>/dev/null done @@ -868,8 +868,16 @@ if checkyesno check_disklabels; then done fi - # append list of new disklabels and fdisks - ls -1d $work_dir/disklabel.* $work_dir/fdisk.* 2>/dev/null | + # if dkctl is available, generate dkctl listwedges for: ed ld sd wd cgd ofdisk ra rl raid + if [ -x /sbin/dkctl ]; then + disks=`iostat -x| awk 'NR > 1 && $1 ~ /^[elsw]d|cgd|ofdisk|r[al]|raid/ { print $1; }'` + for i in $disks; do + /sbin/dkctl $i listwedges > "$work_dir/wedges.$i" 2>/dev/null + done + fi + + # append list of new disklabels, fdisks and wedges + ls -1d $work_dir/disklabel.* $work_dir/fdisk.* $work_dir/wedges.* 2>/dev/null | egrep -v '\.(backup|current)(,v)?$' >> $LABELS CHANGELIST="$LABELS $CHANGELIST" fi