File: finish-install

package info (click to toggle)
mdcfg 1.84
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,420 kB
  • sloc: sh: 380; makefile: 7
file content (15 lines) | stat: -rwxr-xr-x 493 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/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
	if [ "$(udpkg --print-os)" = "kfreebsd" ]; then
		mount -t linprocfs proc /target/proc
	else
		mount -t proc proc /target/proc
	fi
	chroot /target mdadm --detail --scan >> $CF
	umount /target/proc
fi