Browse Source

the stone isntall module now lists the guessed partition content

git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@1409 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc
rocklinux
Rene Rebe 21 years ago
parent
commit
3a0506dacb
2 changed files with 23 additions and 32 deletions
  1. +1
    -0
      Documentation/Developers/CHANGELOG-RENE
  2. +22
    -32
      package/base/sysfiles/stone_mod_install.sh

+ 1
- 0
Documentation/Developers/CHANGELOG-RENE

@ -4,6 +4,7 @@
- fixed bitlbee to use a better sysconfdir when installed into opt/
- improved the exim package to honor prefix, made it jail-able
- improvements and some tiny clenups in misc/jailing
- the stone isntall module now lists the guessed partition content
*) 2003-09-14 (2.0.0-rc1 - 2.0.0-rc2)

+ 22
- 32
package/base/sysfiles/stone_mod_install.sh

@ -32,8 +32,7 @@ part_swap_action() {
part_mount() {
local dir
gui_input "Mount point device $1/$2 will be mounted inside the \
target system (e.g. '/' or '/home'):" '' dir
gui_input "Mount device $1/$2 on directory" '' dir
if [ "$dir" ] ; then
dir="$( echo $dir | sed 's,^/*,,; s,/*$,,' )"
if [ -z "$dir" ] || grep -q " /mnt/target " /proc/mounts
@ -46,37 +45,24 @@ target system (e.g. '/' or '/home'):" '' dir
fi
}
create_fs() {
gui_cmd "Creating filesystem ..." $@
}
part_mkfs() {
cmd="gui_menu part_mkfs 'Create filesystem on $1/$2'"
while read fs ; do
case "$fs" in
ext2)
cmd="$cmd 'ext2fs (non-journaling fs)'"
cmd="$cmd 'create_fs mke2fs /dev/$1/$2'"
;;
ext3)
cmd="$cmd 'ext3fs (journaling filesystem)'"
cmd="$cmd 'create_fs mke2fs -j /dev/$1/$2'"
;;
reiserfs)
cmd="$cmd 'reiserfs (journaling filesystem)'"
cmd="$cmd 'create_fs mkreiserfs /dev/$1/$2'"
;;
jfs)
cmd="$cmd 'IBM JFS (journaling filesystem)'"
cmd="$cmd 'create_fs jfs_mkfs /dev/$1/$2'"
;;
xfs)
cmd="$cmd 'SGI XFS (journaling filesystem)'"
cmd="$cmd 'create_fs mkfs.xfs /dev/$1/$2'"
;;
esac
done < <( sed 's/[^\t]*\t//' /proc/filesystems )
cmd="$cmd 'ext2fs (non-journaling fs)'"
cmd="$cmd 'mke2fs /dev/$1/$2'"
cmd="$cmd 'ext3fs (journaling filesystem)'"
cmd="$cmd 'mke2fs -j /dev/$1/$2'"
cmd="$cmd 'reiserfs (journaling filesystem)'"
cmd="$cmd 'mkreiserfs /dev/$1/$2'"
cmd="$cmd 'IBM JFS (journaling filesystem)'"
cmd="$cmd 'jfs_mkfs /dev/$1/$2'"
cmd="$cmd 'SGI XFS (journaling filesystem)'"
cmd="$cmd 'mkfs.xfs /dev/$1/$2'"
eval "$cmd" && part_mount $1 $2
}
@ -95,14 +81,18 @@ part_unmounted_action() {
part_add() {
local action="unmounted" location="currently not mounted"
if grep -q "^/dev/$1/$2 " /proc/swaps; then
action=swap ; location="swap <no mount point>"
action=swap ; location="swap <no mount point>"
elif grep -q "^/dev/$1/$2 " /proc/mounts; then
action=mounted
location="`grep "^/dev/$1/$2 " /proc/mounts | cut -d ' ' -f 2 | \
sed "s,^/mnt/target,," `"
[ "$location" ] || location="/"
fi
cmd="$cmd '`printf "%-8s" $2` $location' 'part_${action}_action $1 $2'"
type="`disktype /dev/$1/$2 | \
grep -v -e '^ ' -e '^Block device' -e '^Partition' -e '^---' | \
sed -e 's/[,(].*//' -e '/^$/d' -e 's/ $//' | tail -1`"
[ "$type" ] || type="Blank disk/medium?"
cmd="$cmd '`printf "%-8s %-24s" $2 "$location"` ($type)' 'part_${action}_action $1 $2'"
}
disk_action() {

Loading…
Cancel
Save