File: kernelmodules_basicfilesystems

package info (click to toggle)
partman-basicfilesystems 164
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,620 kB
  • sloc: sh: 1,159; makefile: 2
file content (81 lines) | stat: -rwxr-xr-x 1,636 bytes parent folder | download | duplicates (6)
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#!/bin/sh

mkdir -p /var/lib/partman

case `udpkg --print-os` in
  linux)
	cat /proc/modules |
	while read module_name x; do
		if [ "$module_name" = ext2 ]; then
			>/var/lib/partman/ext2
		fi
		if [ "$module_name" = vfat ]; then
			>/var/lib/partman/vfat
		fi
		if [ "$module_name" = fuse ]; then
			>/var/lib/partman/fuse
		fi
		if [ "$module_name" = ntfs ]; then
			>/var/lib/partman/ntfs
		fi
	done

	if ! [ -f /var/lib/partman/ext2 ] && \
	   modprobe ext2  >/dev/null 2>/dev/null; then
		>/var/lib/partman/ext2
	fi

	if ! [ -f /var/lib/partman/vfat ] && \
	   modprobe vfat  >/dev/null 2>/dev/null; then
		>/var/lib/partman/vfat
	fi

	if ! [ -f /var/lib/partman/fuse ] && \
	   modprobe fuse  >/dev/null 2>/dev/null
	then
		>/var/lib/partman/fuse
	fi

	if type ntfs-3g >/dev/null 2>&1 && \
	   [ -f /var/lib/partman/fuse ] && \
	   grep -q fuseblk /proc/filesystems
	then
		>/var/lib/partman/ntfs
		>/var/lib/partman/ntfs-3g
	fi

	if ! [ -f /var/lib/partman/ntfs ] && \
	   modprobe ntfs  >/dev/null 2>/dev/null
	then
		>/var/lib/partman/ntfs
	fi

	if grep -q ext2 /proc/filesystems; then
		>/var/lib/partman/ext2
	fi
	if grep -q vfat /proc/filesystems; then
		>/var/lib/partman/vfat
	fi
	if grep -q ntfs /proc/filesystems; then
		>/var/lib/partman/ntfs
	fi
	;;

  hurd)
	[ -f /hurd/ext2fs ] && >/var/lib/partman/ext2
	[ -f /hurd/fatfs ] && >/var/lib/partman/vfat
	;;

  kfreebsd)
	if kldstat -q -m ext2fs 2>/dev/null || \
		kldload ext2fs >/dev/null 2>/dev/null ; then
		>/var/lib/partman/ext2
	fi

	if kldstat -q -m msdosfs 2>/dev/null || \
		kldload msdosfs >/dev/null 2>/dev/null ; then
		>/var/lib/partman/vfat
	fi
	;;
esac