diff options
author | madduck <madduck@3cfab66f-1918-0410-86b3-c06b76f9a464> | 2007-05-05 18:57:20 +0000 |
---|---|---|
committer | madduck <madduck@3cfab66f-1918-0410-86b3-c06b76f9a464> | 2007-05-05 18:57:20 +0000 |
commit | 70eff9fe9201b932ddf7dfc035c281df25eff085 (patch) | |
tree | 0c01b830a25ae6d991bb9164bd5fc0e7c3e7c5e3 | |
parent | 3a1e403066b047b03dce95a0669199dc57492441 (diff) |
* startall is now mdadm-startall and lives in /sbin, thanks to Eduard Bloch.
It now can handle existing mdadm.conf files much more gracefully, mostly
thanks to the above mkconf enhancements (closes: #415336).
-rw-r--r-- | debian/changelog | 3 | ||||
-rw-r--r-- | debian/control | 2 | ||||
-rw-r--r-- | debian/mdadm-startall (renamed from debian/startall) | 10 | ||||
-rw-r--r-- | debian/mdadm-startall.sgml | 117 | ||||
-rw-r--r-- | debian/mdadm.manpages | 1 | ||||
-rwxr-xr-x | debian/rules | 8 |
6 files changed, 134 insertions, 7 deletions
diff --git a/debian/changelog b/debian/changelog index d0ffddac..c725d7dd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,9 @@ mdadm (2.6.1-1) unstable; urgency=low HOMEHOST (in addition to MAILADDR, which it preserved previously already). PROGRAM is preserved but only added to mdadm.conf if it occured in the previously existing configuration file. + * startall is now mdadm-startall and lives in /sbin, thanks to Eduard Bloch. + It now can handle existing mdadm.conf files much more gracefully, mostly + thanks to the above mkconf enhancements (closes: #415336). -- martin f. krafft <madduck@debian.org> Sat, 05 May 2007 16:12:29 +0200 diff --git a/debian/control b/debian/control index 5aa46687..f34bc592 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Section: admin Priority: optional Maintainer: Debian mdadm maintainers <pkg-mdadm-devel@lists.alioth.debian.org> Uploaders: martin f. krafft <madduck@debian.org>, Mario Joussen <joussen@debian.org> -Build-Depends: debhelper (>= 5), po-debconf, dpatch, groff-base +Build-Depends: debhelper (>= 5), po-debconf, dpatch, groff-base, docbook-to-man Standards-Version: 3.7.2 XS-Vcs-Svn: svn://svn.debian.org/pkg-mdadm/mdadm/trunk diff --git a/debian/startall b/debian/mdadm-startall index 4c4cbe6a..cc6be57d 100644 --- a/debian/startall +++ b/debian/mdadm-startall @@ -16,17 +16,19 @@ ALTCONFIG=/etc/mdadm.conf modprobe -kq md 2>/dev/null || : -if [ ! -f $CONFIG ] && [ ! -f $ALTCONFIG ]; then - mkdir --parents ${CONFIG%/*} - /usr/share/mdadm/mkconf > $CONFIG || ret=$? +[ ! -f $CONFIG ] && [ -f $ALTCONFIG ] && CONFIG=$ALTCONFIG + +if ! grep -q '^ARRAY' $CONFIG 2>/dev/null; then + /usr/share/mdadm/mkconf force-generate || ret=$? case ${ret:-0} in 0) :;; - 255) echo W: mdadm: using existing mdadm.conf file... >&2;; *) echo E: mdadm: mdadm.conf creation failed, aborting. >&2 exit $ret ;; esac +else + echo W: mdadm: using ARRAYs defined in existing mdadm.conf. >&2 fi MDADM_FORCE_AUTOSTART__=1 exec /etc/init.d/mdadm-raid start diff --git a/debian/mdadm-startall.sgml b/debian/mdadm-startall.sgml new file mode 100644 index 00000000..f10243c3 --- /dev/null +++ b/debian/mdadm-startall.sgml @@ -0,0 +1,117 @@ +<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [ + +<!-- Process this file with docbook-to-man to generate an nroff manual + page: `docbook-to-man manpage.sgml > manpage.1'. You may view + the manual page with: `docbook-to-man manpage.sgml | nroff -man | + less'. A typical entry in a Makefile or Makefile.am is: + +manpage.1: manpage.sgml + docbook-to-man $< > $@ + + + The docbook-to-man binary is found in the docbook-to-man package. + Please remember that if you create the nroff version in one of the + debian/rules file targets (such as build), you will need to include + docbook-to-man in your Build-Depends control field. + + --> + + <!-- Fill in your name for FIRSTNAME and SURNAME. --> + <!ENTITY dhfirstname "<firstname>Eduard</firstname>"> + <!ENTITY dhsurname "<surname>Bloch</surname>"> + <!-- Please adjust the date whenever revising the manpage. --> + <!ENTITY dhdate "<date>April 3, 2007</date>"> + <!-- SECTION should be 1-8, maybe w/ subsection other parameters are + allowed: see man(7), man(1). --> + <!ENTITY dhsection "<manvolnum>8</manvolnum>"> + <!ENTITY dhemail "<email>blade@debian.org</email>"> + <!ENTITY dhusername "Eduard Bloch"> + <!ENTITY dhucpackage "<refentrytitle>mdadm-startall</refentrytitle>"> + <!ENTITY dhpackage "mdadm"> + + <!ENTITY debian "<productname>Debian</productname>"> + <!ENTITY gnu "<acronym>GNU</acronym>"> + <!ENTITY gpl "&gnu; <acronym>GPL</acronym>"> +]> + +<refentry> + <refentryinfo> + <address> + &dhemail; + </address> + <author> + &dhfirstname; + &dhsurname; + </author> + <copyright> + <year>2007</year> + <holder>&dhusername;</holder> + </copyright> + &dhdate; + </refentryinfo> + <refmeta> + &dhucpackage; + + &dhsection; + </refmeta> + <refnamediv> + <refname>mdadm-startall</refname> + + <refpurpose>helper script to start all known arrays</refpurpose> + </refnamediv> + <refsynopsisdiv> + <cmdsynopsis> + <command>&dhpackage;</command> + + <arg><option>-r</option></arg> + </cmdsynopsis> + </refsynopsisdiv> + <refsect1> + <title>DESCRIPTION</title> + + <para>The <command>mdadm-startall</command> script scans the system for + arrays and writes a configuration file matching the current state. It then + starts all arrays it found. If a configuration file already exists and + defines arrays, it is used instead. + + </refsect1> + <refsect1> + <title>SEE ALSO</title> + + <para>mdadm (8), mdadm.conf(5)</para> + </refsect1> + <refsect1> + <title>AUTHOR</title> + + <para>This manual page was written by &dhusername; &dhemail; for + the &debian; system (but may be used by others). Permission is + granted to copy, distribute and/or modify this document under + the terms of the &gnu; General Public License, Version 2 any + later version published by the Free Software Foundation. + </para> + <para> + On Debian systems, the complete text of the GNU General Public + License can be found in /usr/share/common-licenses/GPL. + </para> + + </refsect1> +</refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:2 +sgml-indent-data:t +sgml-parent-document:nil +sgml-default-dtd-file:nil +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +--> + + diff --git a/debian/mdadm.manpages b/debian/mdadm.manpages index 4d140821..8dedb236 100644 --- a/debian/mdadm.manpages +++ b/debian/mdadm.manpages @@ -2,3 +2,4 @@ mdadm.8 md.4 mdadm.conf.5 debian/mdrun.8 +debian/mdadm-startall.8 diff --git a/debian/rules b/debian/rules index 434f067f..f87cf145 100755 --- a/debian/rules +++ b/debian/rules @@ -30,8 +30,11 @@ debian/patches/00list: force-run .PHONY: configure configure: debian/patches/00list +debian/mdadm-startall.8: debian/mdadm-startall.sgml + docbook-to-man $< > $@ + build: configure patch build-stamp -build-stamp: +build-stamp: debian/mdadm-startall.8 dh_testdir $(MAKE) -f debian/rules mdadm.udeb DEBIAN=yes $(MAKE) clean @@ -82,9 +85,10 @@ install: build install -m0755 debian/mkconf $(DESTDIR)/usr/share/mdadm install -m0755 debian/checkarray $(DESTDIR)/usr/share/mdadm - install -m0755 debian/startall $(DESTDIR)/usr/share/mdadm install -m0755 debian/bugscript $(DESTDIR)/usr/share/bug/mdadm/script + install -m0755 debian/mdadm-startall $(DESTDIR)/sbin + install -m0644 debian/mdadm.lintian-overrides \ $(DESTDIR)/usr/share/lintian/overrides/mdadm |