diff options
author | Dieter Plaetinck <dieter@plaetinck.be> | 2008-12-07 19:03:14 +0100 |
---|---|---|
committer | Dieter Plaetinck <dieter@plaetinck.be> | 2008-12-07 19:03:14 +0100 |
commit | f67c3e73ad3784f053afaaa03b5fe04d061ad125 (patch) | |
tree | fc79439c7fae2fdf03995d3ee45dffa7a6b48321 /src | |
parent | fc7280a2f861de1c9158b15d40f201228f8dc16e (diff) |
support for swap can be useful
Diffstat (limited to 'src')
-rw-r--r-- | src/core/libs/lib-blockdevices-filesystems.sh | 1 | ||||
-rw-r--r-- | src/core/libs/lib-ui-interactive.sh | 5 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/core/libs/lib-blockdevices-filesystems.sh b/src/core/libs/lib-blockdevices-filesystems.sh index 9e79454..df055de 100644 --- a/src/core/libs/lib-blockdevices-filesystems.sh +++ b/src/core/libs/lib-blockdevices-filesystems.sh @@ -561,6 +561,7 @@ process_filesystem () get_filesystem_program () { [ -z "$1" ] && die_error "get_filesystem_program needs a filesystem id as \$1" + [ $1 = swap ] && echo mkswap && return 0 [ $1 = ext2 ] && echo mkfs.ext2 && return 0 [ $1 = ext3 ] && echo mkfs.ext3 && return 0 [ $1 = reiserfs ] && echo mkreiserfs && return 0 diff --git a/src/core/libs/lib-ui-interactive.sh b/src/core/libs/lib-ui-interactive.sh index dbdb299..a6b94fb 100644 --- a/src/core/libs/lib-ui-interactive.sh +++ b/src/core/libs/lib-ui-interactive.sh @@ -133,7 +133,7 @@ interactive_autoprepare() do ask_number "Enter the size (MB) of your / partition. Recommended size:7500. The /home partition will use the remaining space.\n\nDisk space left: $BLOCKDEVICE_SIZE MB" 1 $BLOCKDEVICE_SIZE || return 1 ROOT_PART_SIZE=$ANSWER_NUMBER - ask_yesno "$(($BLOCKDEVICE_SIZE-$ROOT_PART_SIZE)) MB will be used for your /home partition. Is this OK?" && ROOT_PART_SET=1 + ask_yesno "$(($BLOCKDEVICE_SIZE-$ROOT_PART_SIZE)) MB will be used for your /home partition. Is this OK?" yes && ROOT_PART_SET=1 done CHOSEN_FS="" @@ -257,6 +257,7 @@ interactive_filesystem () # Determine which filesystems/blockdevices are possible for this blockdevice FSOPTS= + [ $part_type = raw -o $part_type = lvm-lv -o $part_type = dm_crypt ] && which `get_filesystem_program swap` &>/dev/null && FSOPTS="$FSOPTS swap Swap" [ $part_type = raw -o $part_type = lvm-lv -o $part_type = dm_crypt ] && which `get_filesystem_program ext2` &>/dev/null && FSOPTS="$FSOPTS ext2 Ext2" [ $part_type = raw -o $part_type = lvm-lv -o $part_type = dm_crypt ] && which `get_filesystem_program ext3` &>/dev/null && FSOPTS="$FSOPTS ext3 Ext3" [ $part_type = raw -o $part_type = lvm-lv -o $part_type = dm_crypt ] && which `get_filesystem_program reiserfs` &>/dev/null && FSOPTS="$FSOPTS reiserfs Reiser3" @@ -282,7 +283,7 @@ interactive_filesystem () fi # ask mountpoint, if relevant - if [[ $fs_type != lvm-* && "$fs_type" != dm_crypt ]] + if [[ $fs_type != lvm-* && "$fs_type" != dm_crypt && $fs_type != swap ]] then default= [ -n "$fs_mountpoint" ] && default="$fs_mountpoint" |