File: create_fstab_header

package info (click to toggle)
partman-target 134
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,180 kB
  • sloc: sh: 479; makefile: 16
file content (41 lines) | stat: -rwxr-xr-x 1,401 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/sh

mkdir -p /target/etc

case `udpkg --print-os` in
        linux) 
		cat >/target/etc/fstab <<EOF
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# systemd generates mount units based on this file, see systemd.mount(5).
# Please run 'systemctl daemon-reload' after making changes here.
#
EOF
		printf "%-15s %-15s %-7s %-15s %-7s %s\n" '# <file system>' '<mount point>' '<type>' '<options>' '<dump>' '<pass>' >> /target/etc/fstab
	;;

	kfreebsd)
		cat >/target/etc/fstab <<EOF
# /etc/fstab: static file system information.
#
EOF
		printf "%-15s %-15s %-7s %-15s %-7s %s\n" '# <file system>' '<mount point>' '<type>' '<options>' '<dump>' '<pass>' >> /target/etc/fstab

		printf "%-15s %-15s %-7s %-15s %-7s %s\n" proc /proc linprocfs rw 0 0 >> /target/etc/fstab
		printf "%-15s %-15s %-7s %-15s %-7s %s\n" sys /sys linsysfs rw 0 0 >> /target/etc/fstab
		printf "%-15s %-15s %-7s %-15s %-7s %s\n" fdesc /dev/fd fdescfs rw 0 0 >> /target/etc/fstab
	;;

	hurd)
		cat >/target/etc/fstab <<EOF
# /etc/fstab: static file system information.
#
EOF
		printf "%-15s %-15s %-7s %-15s %-7s %s\n" '# <file system>' '<mount point>' '<type>' '<options>' '<dump>' '<pass>' >> /target/etc/fstab
	;;
esac