diff options
author | Michael Tokarev <mjt@tls.msk.ru> | 2011-09-10 13:26:17 +0400 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2011-09-10 13:27:56 +0400 |
commit | d98f009ef8866481ad7c848b6b9dcc973c578a7b (patch) | |
tree | 2f3f2710c5ecdf8a208debbe47b7ff9f52b29fb4 /debian | |
parent | c5ec06b32e22a97ceec0dbd7400a3ea988431739 (diff) |
move initscript metadata from /lib/init/rw/.mdadm to /run/mdadm
Debian-Bug: 633054
Diffstat (limited to 'debian')
-rw-r--r-- | debian/changelog | 2 | ||||
-rw-r--r-- | debian/control | 2 | ||||
-rw-r--r-- | debian/mdadm-raid | 17 |
3 files changed, 8 insertions, 13 deletions
diff --git a/debian/changelog b/debian/changelog index ad1df99f..7221aa62 100644 --- a/debian/changelog +++ b/debian/changelog @@ -24,6 +24,8 @@ mdadm (3.2.2-1) UNRELEASED; urgency=low [ Michael Tokarev ] * don't print W: auto-read-only in checkarray in quiet mode, thanks to Bernd Hanisch for the patch (Closes: #605722) + * move initscript metadata from /lib/init/rw/.mdadm to /run/mdadm, + and depend on initscripts (>= 2.88dsf-13.3) for /run (Closes: #633054) -- martin f. krafft <madduck@debian.org> Fri, 29 Jul 2011 15:47:31 +0200 diff --git a/debian/control b/debian/control index 300e5c4a..19828de5 100644 --- a/debian/control +++ b/debian/control @@ -11,7 +11,7 @@ Homepage: http://neil.brown.name/blog/mdadm Package: mdadm Architecture: any -Depends: ${shlibs:Depends}, udev | makedev, ${misc:Depends}, lsb-base (>= 3.1-6), debconf (>= 1.4.72) +Depends: ${shlibs:Depends}, udev | makedev, ${misc:Depends}, lsb-base (>= 3.1-6), debconf (>= 1.4.72), initscripts (>= 2.88dsf-13.3) Recommends: default-mta | mail-transport-agent, module-init-tools Replaces: mdctl Conflicts: mdctl (<< 0.7.2), raidtools2 (<< 1.00.3-12.1), initramfs-tools (<< 0.65) diff --git a/debian/mdadm-raid b/debian/mdadm-raid index e85ec095..b53a5a81 100644 --- a/debian/mdadm-raid +++ b/debian/mdadm-raid @@ -32,6 +32,7 @@ DEBIANCONFIG=/etc/default/mdadm test -x "$MDADM" || exit 0 AUTOSTART=true +STATEDIR=/run/mdadm test -f $DEBIANCONFIG && . $DEBIANCONFIG . /lib/lsb/init-functions @@ -81,15 +82,6 @@ is_true() esac } -for dir in /lib/init/rw /dev/shm /dev; do - statedir=$dir/.mdadm - test -d $statedir && STATEDIR=$statedir && break - test -w $dir || continue - mkdir $statedir || continue - STATEDIR=$statedir - break -done - case "${1:-}" in start) PREFIX="Assembling MD array" @@ -173,13 +165,14 @@ case "${1:-}" in ret=$? log_action_begin_msg "Generating udev events for MD arrays" + [ -d $STATEDIR ] || mkdir -p $STATEDIR for uevent in /sys/block/md*/uevent; do test -e $uevent || break sentinel=${uevent#/sys/block/}; sentinel=${sentinel%/uevent}-uevent - test -e ${STATEDIR:-/doesnotexist}/$sentinel && continue + test -e $STATEDIR/$sentinel && continue test -w $uevent || continue echo add > $uevent - test -d "${STATEDIR:-}" && : > $STATEDIR/$sentinel + test -d $STATEDIR && : > $STATEDIR/$sentinel done log_action_end_msg 0 @@ -238,7 +231,7 @@ case "${1:-}" in esac done || exit $? - rm -rf ${STATEDIR:-} + rm -f $STATEDIR/md*-uevent else log_notice "disabled in $DEBIANCONFIG" |