summaryrefslogtreecommitdiff
path: root/src/core/libs/lib-blockdevices-filesystems.sh
diff options
context:
space:
mode:
authorDieter Plaetinck <dieter@plaetinck.be>2010-12-05 18:10:00 +0100
committerDieter Plaetinck <dieter@plaetinck.be>2010-12-05 18:10:00 +0100
commit839ade1073032d841a3823e0a25d0ded19cc8b71 (patch)
treed97a513f1b53e8ac0e6faa6e724c344b86296748 /src/core/libs/lib-blockdevices-filesystems.sh
parentaebbe84b8e5c195e2c6238f6e1770f41b0612a9c (diff)
make AIF track needed filesystem packages
filesystem packages are scheduled to go out of base, hence AIF must track which ones are needed and which are not by keeping an eye open during the filesystems creation (and rollback) steps. In the interactive procedure, the appropriate packages will be preselected, in the automatic procedure, you're supposed to configure the needed packages yourself now. This is reflected in the examples.
Diffstat (limited to 'src/core/libs/lib-blockdevices-filesystems.sh')
-rw-r--r--src/core/libs/lib-blockdevices-filesystems.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/core/libs/lib-blockdevices-filesystems.sh b/src/core/libs/lib-blockdevices-filesystems.sh
index 3ebdc75..897c97e 100644
--- a/src/core/libs/lib-blockdevices-filesystems.sh
+++ b/src/core/libs/lib-blockdevices-filesystems.sh
@@ -478,6 +478,17 @@ process_filesystems ()
then
debug 'FS' "$fs_id ->Already done"
else
+ needs_pkg=
+ [ $fs_type = 'lvm-pv' ] && needs_pkg=lvm2
+ [ $fs_type = 'xfs' ] && needs_pkg=xfsprogs
+ [ $fs_type = 'jfs' ] && needs_pkg=jfsutils
+ [ $fs_type = 'reiserfs' ] && needs_pkg=reiserfsprogs
+ [[ $fs_type =~ ext.* ]] && needs_pkg=e2fsprogs
+ [ $fs_type = 'vfat' ] && needs_pkg=dosfstools
+ [ $fs_type = 'dm_crypt' ] && needs_pkg=cryptsetup
+
+ [ -n "$needs_pkg" ] && check_is_in $needs_pkg "${needed_pkgs_fs[@]}" || needed_pkgs_fs+=($needs_pkg)
+
# We can't always do -b on the lvm VG. because the devicefile sometimes doesn't exist for a VG. vgdisplay to the rescue!
if [ "$part_type" = lvm-vg ] && vgdisplay $part | grep -q 'VG Name' # $part is a lvm VG and it exists. note that vgdisplay exists 0 when the requested vg doesn't exist.
then
@@ -687,6 +698,7 @@ rollback_filesystems ()
[ -n "$warnings" ] && inform "Rollback failed" disks 1 && show_warning "Rollback problems" "Some problems occurred while rolling back: $warnings.\n Thisk needs to be fixed before retrying disk/filesystem creation or restarting the installer" && return 1
inform "Rollback succeeded" disks 1
done_filesystems=
+ needed_pkgs_fs=
BLOCK_ROLLBACK_USELESS=1
return 0
}