diff options
author | Dieter Plaetinck <dieter@plaetinck.be> | 2010-03-05 23:40:13 +0100 |
---|---|---|
committer | Dieter Plaetinck <dieter@plaetinck.be> | 2010-03-05 23:40:13 +0100 |
commit | e7e816d8bd8ff505351497622ea7544b4aecdca4 (patch) | |
tree | de50c27d57388b654f1fcfb7c5340bd5356f0986 /src/core/libs | |
parent | f7aa729579c4f81392446a9a775376f8438ab776 (diff) | |
parent | 35e442546e0ead5bd1d1718a39d7ab644cd6fa8c (diff) |
Merge branch 'experimental'
Diffstat (limited to 'src/core/libs')
-rw-r--r-- | src/core/libs/lib-blockdevices-filesystems.sh | 8 | ||||
-rw-r--r-- | src/core/libs/lib-ui-interactive.sh | 10 | ||||
-rw-r--r-- | src/core/libs/lib-ui.sh | 2 |
3 files changed, 13 insertions, 7 deletions
diff --git a/src/core/libs/lib-blockdevices-filesystems.sh b/src/core/libs/lib-blockdevices-filesystems.sh index c0fe3ad..841ccf4 100644 --- a/src/core/libs/lib-blockdevices-filesystems.sh +++ b/src/core/libs/lib-blockdevices-filesystems.sh @@ -368,7 +368,7 @@ partition() # invoke sfdisk debug 'FS' "Partition calls: sfdisk $DEVICE -uM >$LOG 2>&1 <<< $sfdisk_input" printk off - sfdisk $DEVICE -uM >$LOG 2>&1 <<EOF + sfdisk -D $DEVICE -uM >$LOG 2>&1 <<EOF $sfdisk_input EOF if [ $? -gt 0 ]; then @@ -763,10 +763,12 @@ process_filesystem () local _uuid="$(getuuid $part)" if [ -n "${_uuid}" ]; then _device="UUID=${_uuid}" + else + _device=$part fi - if ! grep -q "$part $fs_mountpoint $fs_type defaults 0 " $TMP_FSTAB 2>/dev/null #$TMP_FSTAB may not exist yet + if ! grep -q "$_device $fs_mountpoint $fs_type defaults 0 " $TMP_FSTAB 2>/dev/null #$TMP_FSTAB may not exist yet then - echo -n "$part $fs_mountpoint $fs_type defaults 0 " >> $TMP_FSTAB + echo -n "$_device $fs_mountpoint $fs_type defaults 0 " >> $TMP_FSTAB if [ "$fs_type" = "swap" ]; then echo "0" >>$TMP_FSTAB else diff --git a/src/core/libs/lib-ui-interactive.sh b/src/core/libs/lib-ui-interactive.sh index 8a66522..e53966e 100644 --- a/src/core/libs/lib-ui-interactive.sh +++ b/src/core/libs/lib-ui-interactive.sh @@ -242,10 +242,13 @@ interactive_autoprepare() notify "Available Disks:\n\n$(_getavaildisks)\n" ask_option no 'Harddrive selection' "Select the hard drive to use" required $(finddisks 1 _) || return 1 DISC=$ANSWER_OPTION + elif [ -z "$DISCS" ]; then + ask_string "Could not find disk. Please enter path of devicefile manually" "" || return 1 + DISC=$ANSWER_STRING else DISC=$DISCS fi - + # TODO : some checks if $DISC is really a blockdevice is probably a good idea DISC=${DISC// /} # strip all whitespace. we need this for some reason.TODO: find out why get_blockdevice_size $DISC MiB @@ -452,7 +455,7 @@ interactive_filesystem () then default=no [ -n "$fs_mountpoint" ] && default="$fs_mountpoint" - ask_option $default "Select the mountpoint" "Select a mountpoint for $part" required / 'root' /boot 'files for booting' /etc 'config files' /home 'home directories' /tmp 'temporary files' custom 'enter a custom mountpoint' || return 1 + ask_option $default "Select the mountpoint" "Select a mountpoint for $part" required / 'root' /boot 'files for booting' /home 'home directories' /var 'variable files' /tmp 'temporary files' custom 'enter a custom mountpoint' || return 1 fs_mountpoint=$ANSWER_OPTION [ "$default" == 'no' ] && default= if [ "$ANSWER_OPTION" == custom ] @@ -767,6 +770,7 @@ Note that right now the packages (and groups) selection is limited to the repos # sort by group _pkglist="$(echo "$_pkglist" | sort -f -k 2)" + [ -z "$_pkglist" ] && show_warning "No packages found" "Sorry. I could not find any packages. maybe your network is not setup correctly, you lost connection, no mirror setup, bad group, ..." && return 1 ask_checklist "Select Packages To Install." $_pkglist || return 1 var_TARGET_PACKAGES=$ANSWER_CHECKLIST # contains now all package names @@ -910,7 +914,7 @@ interactive_grub() { DEVS=$(finddisks 1 _) DEVS="$DEVS $(findpartitions 1 _)" - if [ "$DEVS" = "" ]; then + if [ "$DEVS" = " " ]; then notify "No hard drives were found" return 1 fi diff --git a/src/core/libs/lib-ui.sh b/src/core/libs/lib-ui.sh index 5a8140f..0f04fcb 100644 --- a/src/core/libs/lib-ui.sh +++ b/src/core/libs/lib-ui.sh @@ -249,7 +249,7 @@ ask_password () # $1 question # $2 default (optional) # $3 exitcode to use when string is empty and there was no default, or default was ignored (1 default) -# echo's the string the user gave. +# Sets $ANSWER_STRING to response. # returns 1 if the user cancelled, 0 otherwise ask_string () { |