File: fstab_hd_entries

package info (click to toggle)
partman-target 49
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 708 kB
  • ctags: 8
  • sloc: sh: 379; makefile: 29
file content (23 lines) | stat: -rwxr-xr-x 482 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh

[ -f /target/etc/fstab ] || exit 0

fstab=$(
    for i in /lib/partman/fstab.d/*; do
	[ -x "$i" ] || continue
	$i
    done |
    while read fs mp type options dump pass; do
	echo $mp $fs $type $options $dump $pass
    done |
    sort |
    while read mp fs type options dump pass; do
	case "$fs" in
	    (/*)
		printf "%-15s %-15s %-7s %-15s %-7s %s\n" "$(mapdevfs $fs)" "${mp}" "$type" "$options" "$dump" "$pass"
		;;
	esac
    done
)

echo "$fstab" >>/target/etc/fstab