summaryrefslogtreecommitdiff
path: root/src/core/libs
diff options
context:
space:
mode:
authorDieter Plaetinck <dieter@plaetinck.be>2009-07-26 18:15:11 +0200
committerDieter Plaetinck <dieter@plaetinck.be>2009-07-26 18:15:11 +0200
commit061924c6aa9770c300fc537e3047df90dc731223 (patch)
tree83f4e050912bdda4fe02c4c74f142e18eb1be452 /src/core/libs
parent84193cef8b9a13cb39cb35abe80914640dbe3982 (diff)
prepare HOOKS in mkinitcpio.conf automatically for lvm/dm_crypt users + (better) notes to user to pay attention to mkinitcpio.conf + grub menu.lst
Diffstat (limited to 'src/core/libs')
-rw-r--r--src/core/libs/lib-ui-interactive.sh15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/core/libs/lib-ui-interactive.sh b/src/core/libs/lib-ui-interactive.sh
index 0ab2785..c471ec0 100644
--- a/src/core/libs/lib-ui-interactive.sh
+++ b/src/core/libs/lib-ui-interactive.sh
@@ -43,12 +43,20 @@ interactive_configure_system()
-e "s/^HARDWARECLOCK=.*/HARDWARECLOCK=\"$HARDWARECLOCK\"/g" \
${var_TARGET_DIR}/etc/rc.conf
+ # prepare HOOKS in mkinitcpio.conf for lvm/dm_crypt users
+ if get_anchestors_mount ';/;'
+ then
+ hooks=`echo "$ANSWER_DEVICES" | cut -d ' ' -f2 | egrep 'lvm-lv|dm_crypt' | sed -e 's/lvm-lv/lvm2/' -e 's/dm_crypt/encrypt/' | tac`
+ hooks=`echo $hooks`
+ [ -n "$hooks" ] && sed -i "s/filesystems/$hooks filesystems/" ${var_TARGET_DIR}/etc/mkinitcpio.conf
+ fi
+
# main menu loop
while true; do
DEFAULT=no
[ -n "$FILE" ] && DEFAULT="$FILE"
helptext="Note that if you want to change any file not listed here (unlikely) you can go to another tty and update ${var_TARGET_DIR}/etc/<filename> yourself"
- grep -q '^/dev/mapper' $TMP_FSTAB && helptext="$helptext\nDon't forget to add the appropriate modules for your /dev/mapper devices to mkinitcpio.conf" #TODO: we can improve this a bit
+ grep -q '^/dev/mapper' $TMP_FSTAB && helptext="$helptext\n/dev/mapper/ users: Pay attention to HOOKS in mkinitcpio.conf"
ask_option $DEFAULT "Configuration" "$helptext" required \
"/etc/rc.conf" "System Config" \
"/etc/fstab" "Filesystem Mountpoints" \
@@ -911,8 +919,9 @@ EOF
fi
fi
-
- notify "Before installing GRUB, you must review the configuration file. You will now be put into the editor. After you save your changes and exit the editor, you can install GRUB."
+ helptext=
+ grep -q '^/dev/mapper' $TMP_FSTAB && helptext=" /dev/mapper/ users: Pay attention to the kernel line!"
+ notify "Before installing GRUB, you must review the configuration file. You will now be put into the editor. After you save your changes and exit the editor, you can install GRUB.$helptext"
if [ -z "$EDITOR" ]
then
interactive_get_editor || return 1