~xubuntu-dev/ubiquity/lp1437180_feh

« back to all changes in this revision

Viewing changes to partman/check.d/05no_xfs_boot

  • Committer: Colin Watson
  • Date: 2007-02-21 00:46:09 UTC
  • Revision ID: colin.watson@canonical.com-20070221004609-vmwlwk5wpa3r7iqr
  - partman-* updates add validation support (LP: #82768); also add
    XFS-on-/boot validation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh
 
2
# grub does not work with /boot on xfs. Detect and warn.
 
3
 
 
4
. /usr/share/debconf/confmodule
 
5
 
 
6
ARCH="$(udpkg --print-architecture)"
 
7
case $ARCH in
 
8
        amd64|i386)
 
9
                ;;
 
10
        *)
 
11
                exit 0
 
12
                ;;
 
13
esac
 
14
 
 
15
get_xfs_root_boot () {
 
16
        (for i in /lib/partman/fstab.d/*; do
 
17
                [ -x "$i" ] || continue
 
18
                $i
 
19
        done) | 
 
20
        while read fs mp type options dump pass; do
 
21
                if [ "$mp" = / ]; then
 
22
                        echo root_type=$type
 
23
                elif [ "$mp" = /boot ]; then
 
24
                        echo boot_type=$type
 
25
                fi
 
26
        done
 
27
}
 
28
eval "$(get_xfs_root_boot)"
 
29
 
 
30
if [ "$boot_type" = xfs ] || \
 
31
   ([ -z "$boot_type" ] && [ "$root_type" = xfs ]); then
 
32
        db_input critical grub-installer/install_to_xfs || true
 
33
        db_go || exit 1
 
34
        db_get grub-installer/install_to_xfs
 
35
        if [ "$RET" = false ]; then
 
36
                exit 1
 
37
        fi
 
38
fi
 
39
 
 
40
exit 0