home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 November (DVD) / PCWELT_11_2006.ISO / casper / filesystem.squashfs / usr / lib / os-probes / init / 10filesystems
Encoding:
Text File  |  2005-12-06  |  773 b   |  29 lines

  1. #!/bin/sh
  2. # Make sure filesystems are available.
  3. set +e    # ignore errors from modprobe
  4.  
  5. FILESYSTEMS='ext2 ext3 reiserfs xfs jfs msdos vfat ntfs minix hfs hfsplus qnx4'
  6.  
  7. if [ ! -e /var/lib/os-prober/modules ]; then
  8.     # Check for anna-install to make it easier to use os-prober outside
  9.     # d-i.
  10.     if type anna-install >/dev/null 2>&1; then
  11.         for fs in $FILESYSTEMS; do
  12.             ANNA_QUIET=1 DEBIAN_FRONTEND=none \
  13.             log-output -t os-prober \
  14.                 anna-install "$fs-modules" || true
  15.         done
  16.         depmod -a >/dev/null 2>&1 || true
  17.     fi
  18.  
  19.     for fs in $FILESYSTEMS; do
  20.         modprobe $fs 2>/dev/null | logger -t os-prober
  21.     done
  22.  
  23.     # We only want to keep this state inside d-i, so this is as good a
  24.     # check as any.
  25.     if type anna-install >/dev/null 2>&1; then
  26.         touch /var/lib/os-prober/modules
  27.     fi
  28. fi
  29.