diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-06-10 02:09:51 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-06-10 02:09:51 +0000 |
commit | e5ff5c7b3dcbbb157723502cfac48ec11f5e381a (patch) | |
tree | f7721d95863b170e06487c843da2db9d283eae05 /sys-fs | |
parent | Mask media-video/dirac (diff) | |
download | gentoo-2-e5ff5c7b3dcbbb157723502cfac48ec11f5e381a.tar.gz gentoo-2-e5ff5c7b3dcbbb157723502cfac48ec11f5e381a.tar.bz2 gentoo-2-e5ff5c7b3dcbbb157723502cfac48ec11f5e381a.zip |
Tweak device node creation to handle subpaths #95593 by Milan Holzäpfel.
(Portage version: 2.0.51.22-r1)
Diffstat (limited to 'sys-fs')
-rw-r--r-- | sys-fs/mdadm/ChangeLog | 5 | ||||
-rwxr-xr-x | sys-fs/mdadm/files/raid-start.sh | 17 | ||||
-rw-r--r-- | sys-fs/raidtools/ChangeLog | 5 | ||||
-rwxr-xr-x | sys-fs/raidtools/files/raid-start.sh | 17 |
4 files changed, 30 insertions, 14 deletions
diff --git a/sys-fs/mdadm/ChangeLog b/sys-fs/mdadm/ChangeLog index dd27f5cd2fd1..ab8e09575bb8 100644 --- a/sys-fs/mdadm/ChangeLog +++ b/sys-fs/mdadm/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for sys-fs/mdadm # Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/mdadm/ChangeLog,v 1.6 2005/06/10 01:35:55 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-fs/mdadm/ChangeLog,v 1.7 2005/06/10 02:09:28 vapier Exp $ + + 10 Jun 2005; Mike Frysinger <vapier@gentoo.org> files/raid-start.sh: + Tweak device node creation to handle subpaths #95593 by Milan Holzäpfel. 10 Jun 2005; Mike Frysinger <vapier@gentoo.org> +files/raid-stop.sh, mdadm-1.9.0-r1.ebuild, mdadm-1.11.0.ebuild: diff --git a/sys-fs/mdadm/files/raid-start.sh b/sys-fs/mdadm/files/raid-start.sh index d2e35eaafa21..47dfeffb2425 100755 --- a/sys-fs/mdadm/files/raid-start.sh +++ b/sys-fs/mdadm/files/raid-start.sh @@ -1,7 +1,7 @@ # /lib/rcscripts/addons/raid-start.sh: Setup raid volumes at boot # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/mdadm/files/raid-start.sh,v 1.3 2005/05/19 22:15:51 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-fs/mdadm/files/raid-start.sh,v 1.4 2005/06/10 02:09:28 vapier Exp $ [[ -f /proc/mdstat ]] || exit 0 @@ -11,11 +11,16 @@ MAJOR=9 # Try to make sure the devices exist before we use them create_devs() { - local d - for d in $@ ; do - d=${d/\/dev\/} - [[ -e /dev/${d} ]] && continue - mknod /dev/${d} b ${MAJOR} ${d##*md} >& /dev/null + local node dir minor + for node in $@ ; do + [[ ${node} != /dev/* ]] && node=/dev/${node} + [[ -e ${node} ]] && continue + + dir=${node%/*} + [[ ! -d ${dir} ]] && mkdir -p "${dir}" + + minor=${node##*/} + mknod "${node}" b ${MAJOR} ${minor##*md} &> /dev/null done } diff --git a/sys-fs/raidtools/ChangeLog b/sys-fs/raidtools/ChangeLog index 40ba5e3b1ab8..7b567684aad0 100644 --- a/sys-fs/raidtools/ChangeLog +++ b/sys-fs/raidtools/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for sys-fs/raidtools # Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/raidtools/ChangeLog,v 1.22 2005/06/10 01:34:57 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-fs/raidtools/ChangeLog,v 1.23 2005/06/10 02:09:51 vapier Exp $ + + 10 Jun 2005; Mike Frysinger <vapier@gentoo.org> files/raid-start.sh: + Tweak device node creation to handle subpaths #95593 by Milan Holzäpfel. 10 Jun 2005; Mike Frysinger <vapier@gentoo.org> +files/raid-stop.sh, raidtools-1.00.3-r6.ebuild: diff --git a/sys-fs/raidtools/files/raid-start.sh b/sys-fs/raidtools/files/raid-start.sh index 5a95bd312898..652b319dcdea 100755 --- a/sys-fs/raidtools/files/raid-start.sh +++ b/sys-fs/raidtools/files/raid-start.sh @@ -1,7 +1,7 @@ # /lib/rcscripts/addons/raid-start.sh: Setup raid volumes at boot # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/raidtools/files/raid-start.sh,v 1.4 2005/05/19 22:16:16 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-fs/raidtools/files/raid-start.sh,v 1.5 2005/06/10 02:09:51 vapier Exp $ [[ -f /proc/mdstat ]] || exit 0 @@ -11,11 +11,16 @@ MAJOR=9 # Try to make sure the devices exist before we use them create_devs() { - local d - for d in $@ ; do - d=${d/\/dev\/} - [[ -e /dev/${d} ]] && continue - mknod /dev/${d} b ${MAJOR} ${d##*md} >& /dev/null + local node dir minor + for node in $@ ; do + [[ ${node} != /dev/* ]] && node=/dev/${node} + [[ -e ${node} ]] && continue + + dir=${node%/*} + [[ ! -d ${dir} ]] && mkdir -p "${dir}" + + minor=${node##*/} + mknod "${node}" b ${MAJOR} ${minor##*md} &> /dev/null done } |