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
|
#!/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" = hfs ]; then
>/var/lib/partman/hfs
fi
if [ "$module_name" = hfsplus ]; then
>/var/lib/partman/hfsplus
fi
done
if ! [ -f /var/lib/partman/hfs ] && \
modprobe hfs >/dev/null 2>/dev/null; then
>/var/lib/partman/hfs
fi
if ! [ -f /var/lib/partman/hfsplus ] && \
modprobe hfsplus >/dev/null 2>/dev/null; then
>/var/lib/partman/hfsplus
fi
if ! [ -f /var/lib/partman/hfs ] && \
grep -q hfs /proc/filesystems; then
>/var/lib/partman/hfs
fi
if ! [ -f /var/lib/partman/hfsplus ] && \
grep -q hfsplus /proc/filesystems; then
>/var/lib/partman/hfsplus
fi
;;
esac
|