File: kernelmodules_basicfilesystems

package info (click to toggle)
partman-basicfilesystems 69
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 2,048 kB
  • ctags: 10
  • sloc: sh: 1,018; makefile: 2
file content (52 lines) | stat: -rwxr-xr-x 1,016 bytes parent folder | download | duplicates (2)
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
#!/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
	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 grep -q ext2 /proc/filesystems; then
		>/var/lib/partman/ext2
	fi
	if grep -q vfat /proc/filesystems; then
		>/var/lib/partman/vfat
	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