File: finish-install

package info (click to toggle)
mdcfg 1.28
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 1,152 kB
  • ctags: 14
  • sloc: sh: 373; makefile: 33
file content (11 lines) | stat: -rwxr-xr-x 397 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh
CF=/target/etc/mdadm/mdadm.conf
if [ ! -s "$CF" ] && [ -e /proc/mdstat ] && \
   grep ^md /proc/mdstat >/dev/null; then
	mkdir -p /target/etc/mdadm
	echo "# Autogenerated by mdcfg. See mdadm.conf(5) for more details on this file." > /etc/mdadm.conf
	echo "DEVICE partitions" >> $CF
	chroot /target mount /proc
	chroot /target mdadm --detail --scan >> $CF
	chroot /target umount /proc
fi