From dcdf7a1d1a9ef0cd5f28012ce01e306ae71f86e0 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 7 Jan 2017 12:51:46 +0100 Subject: [PATCH] saving uncommitted changes in /etc prior to emerge run --- .etckeeper | 3 ++- conf.d/mdraid | 6 ++++++ cron.weekly/mdadm | 1 + default/mdadm | 9 +++++++++ init.d/mdadm | 4 ++-- init.d/mdraid | 8 ++++---- 6 files changed, 24 insertions(+), 7 deletions(-) mode change 100644 => 100755 cron.weekly/mdadm create mode 100644 default/mdadm diff --git a/.etckeeper b/.etckeeper index 99285c2..7d7c8e6 100755 --- a/.etckeeper +++ b/.etckeeper @@ -1150,7 +1150,7 @@ maybe chmod 0750 'cron.hourly' maybe chmod 0755 'cron.hourly/rsync-git.sh' maybe chmod 0750 'cron.monthly' maybe chmod 0750 'cron.weekly' -maybe chmod 0644 'cron.weekly/mdadm' +maybe chmod 0755 'cron.weekly/mdadm' maybe chmod 0644 'crontab' maybe chmod 0644 'csh.env' maybe chgrp 'lp' 'cups' @@ -1179,6 +1179,7 @@ maybe chmod 0644 'dbus-1/system.d/cups.conf' maybe chmod 0755 'default' maybe chmod 0644 'default/grub' maybe chmod 0644 'default/grub.orig' +maybe chmod 0644 'default/mdadm' maybe chmod 0600 'default/useradd' maybe chmod 0644 'dhcpcd.conf' maybe chmod 0644 'dispatch-conf.conf' diff --git a/conf.d/mdraid b/conf.d/mdraid index daa17ab..5694d73 100644 --- a/conf.d/mdraid +++ b/conf.d/mdraid @@ -3,3 +3,9 @@ # For people who run raid on top of some other layer (like # dmcrypt), use rc_need to specify that requirement. See # the runscript(8) man page for more information. + +# Most configuration happens in /etc/mdadm.conf. + +# Pass additional options when assembling raids. +# Note: This applies to all raids. +MDADM_ASSEMBLE_OPTS="" diff --git a/cron.weekly/mdadm b/cron.weekly/mdadm old mode 100644 new mode 100755 index 72e401d..e2b35b5 --- a/cron.weekly/mdadm +++ b/cron.weekly/mdadm @@ -1,4 +1,5 @@ #!/bin/sh +# This requires that AUTOCHECK is true in /etc/default/mdadm if [ -x /usr/sbin/checkarray ] && [ $(date +\%d) -le 7 ]; then /usr/sbin/checkarray --cron --all --idle --quiet fi diff --git a/default/mdadm b/default/mdadm new file mode 100644 index 0000000..921c70b --- /dev/null +++ b/default/mdadm @@ -0,0 +1,9 @@ +# Based on Debian /etc/default/mdadm + +# Gentoo comment: The cronjob checks for this value to decide to actually +# validate arrays. If missing, it does NOT actually do anything. +# AUTOCHECK: +# should mdadm run periodic redundancy checks over your arrays? See +# /etc/cron.weekly/mdadm + +#AUTOCHECK=true diff --git a/init.d/mdadm b/init.d/mdadm index c30004d..c721c4d 100755 --- a/init.d/mdadm +++ b/init.d/mdadm @@ -1,7 +1,7 @@ -#!/sbin/runscript +#!/sbin/openrc-run # Copyright 1999-2006 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/mdadm/files/mdadm.rc,v 1.2 2006/04/25 05:41:51 vapier Exp $ +# $Id$ depend() { use logger dns net diff --git a/init.d/mdraid b/init.d/mdraid index 27421e2..327b89e 100755 --- a/init.d/mdraid +++ b/init.d/mdraid @@ -1,7 +1,7 @@ -#!/sbin/runscript -# Copyright 1999-2011 Gentoo Foundation +#!/sbin/openrc-run +# Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/mdadm/files/mdraid.rc,v 1.6 2011/11/12 21:06:44 vapier Exp $ +# $Id$ depend() { before checkfs fsck @@ -12,7 +12,7 @@ start() { local output ebegin "Starting up RAID devices" - output=$(mdadm -As 2>&1) + output=$(mdadm -As ${MDADM_ASSEMBLE_OPTS} 2>&1) eend $? "${output}" local pat="/dev/md_d*" -- 2.39.5