Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/etc Record current raid configurations too in /etc/security.
details: https://anonhg.NetBSD.org/src/rev/d7dd8fff092c
branches: trunk
changeset: 343871:d7dd8fff092c
user: riastradh <riastradh%NetBSD.org@localhost>
date: Mon Feb 29 16:16:42 2016 +0000
description:
Record current raid configurations too in /etc/security.
diffstat:
etc/security | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diffs (31 lines):
diff -r 15184196679a -r d7dd8fff092c etc/security
--- a/etc/security Mon Feb 29 16:14:57 2016 +0000
+++ b/etc/security Mon Feb 29 16:16:42 2016 +0000
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $NetBSD: security,v 1.120 2015/04/20 22:46:35 pgoyette Exp $
+# $NetBSD: security,v 1.121 2016/02/29 16:16:42 riastradh Exp $
# from: @(#)security 8.1 (Berkeley) 6/9/93
#
@@ -952,9 +952,18 @@
done
fi
+ # if raidctl is available, generate raidctls for: raid
+ if [ -x /sbin/raidctl ]; then
+ disks=$(iostat -x | awk 'NR > 1 && $1 ~ /^raid/ { print $1; }')
+ for i in $disks; do
+ /sbin/raidctl -G $i > "$work_dir/raidconf.$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 |
+ $work_dir/raidconf.* 2>/dev/null |
egrep -v '\.(backup|current)(,v)?$' >> $LABELS
CHANGELIST="$LABELS $CHANGELIST"
fi
Home |
Main Index |
Thread Index |
Old Index