Browse Source

improved stone_mod_install to display the size of the partitions

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

+ 1
- 0
Documentation/Developers/CHANGELOG-RENE

@ -3,6 +3,7 @@
- Juergen Sawinski: updated xfree86 cyrillic fonts
- fixed (hopefully - no functionality test) webmin
- improved stone_mod_install to display the size of the partitions
*) 2003-11-24 (2.0.0-rc3 - 2.0.0-rc4)

+ 12
- 12
package/base/sysfiles/stone_mod_install.sh

@ -58,15 +58,11 @@ part_mkfs() {
cmd="$cmd 'reiserfs (journaling filesystem)'"
cmd="$cmd 'mkreiserfs /dev/$1/$2'"
if type -p jfs_mkfs > /dev/null ; then
cmd="$cmd 'IBM JFS (journaling filesystem)'"
cmd="$cmd 'jfs_mkfs /dev/$1/$2'"
fi
cmd="$cmd 'IBM JFS (journaling filesystem)'"
cmd="$cmd 'jfs_mkfs /dev/$1/$2'"
if type -p mkfs.xfs > /dev/null ; then
cmd="$cmd 'SGI XFS (journaling filesystem)'"
cmd="$cmd 'mkfs.xfs /dev/$1/$2'"
fi
cmd="$cmd 'SGI XFS (journaling filesystem)'"
cmd="$cmd 'mkfs.xfs /dev/$1/$2'"
eval "$cmd" && part_mount $1 $2
}
@ -93,11 +89,15 @@ part_add() {
sed "s,^/mnt/target,," `"
[ "$location" ] || location="/"
fi
type="`disktype /dev/$1/$2 | \
grep -v -e '^ ' -e '^Block device' -e '^Partition' -e '^---' | \
sed -e 's/[,(].*//' -e '/^$/d' -e 's/ $//' | tail -1`"
# save partition information
disktype /dev/$1/$2 > /tmp/stone-install
type="`grep /tmp/stone-install -v -e '^ ' -e '^Block device' \
-e '^Partition' -e '^---' | \
sed -e 's/[,(].*//' -e '/^$/d' -e 's/ $//' | tail -1`"
size="`grep 'Block device, size' /tmp/stone-install | \
sed 's/.* size \(.*\) (.*/\1/'`"
[ "$type" ] || type="undetected"
cmd="$cmd '`printf "%-8s %-24s" $2 "$location"` ($type)' 'part_${action}_action $1 $2'"
cmd="$cmd '`printf "%-6s %-24s %-10s" $2 "$location" "$size"` ($type)' 'part_${action}_action $1 $2'"
}
disk_action() {

Loading…
Cancel
Save