diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2009-02-06 14:28:06 +0000 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2009-02-06 14:28:06 +0000 |
commit | 284f4496c3eead8a0f676f3b69aff6458b76bc06 (patch) | |
tree | 450ea2c86a9e6a60903f3d831fbe44996ae3dc1b | |
parent | 92a4d6b28a7e34cccf0b7b4e079a4500ee21452d (diff) | |
download | lvm2-284f4496c3eead8a0f676f3b69aff6458b76bc06.tar.gz lvm2-284f4496c3eead8a0f676f3b69aff6458b76bc06.tar.xz lvm2-284f4496c3eead8a0f676f3b69aff6458b76bc06.zip |
Remove external dependency on the 'cut' command in fsadm
-rw-r--r-- | WHATS_NEW | 3 | ||||
-rw-r--r-- | scripts/fsadm.sh | 9 |
2 files changed, 7 insertions, 5 deletions
@@ -1,7 +1,8 @@ Version 2.02.45 - =================================== + Remove external dependency on the 'cut' command in fsadm. Fix pvs segfault when pv mda attributes requested for not available PV. - Add support for ext4 resize in fsadm + Add support for ext4 resize in fsadm. Move locking_type reading inside init_locking(). Rename get_vgs() to get_vgnames() and clarify related error messages. Allow clvmd to be built with all cluster managers & select one on cmdline. diff --git a/scripts/fsadm.sh b/scripts/fsadm.sh index 3c01b1d6..0fa7b72a 100644 --- a/scripts/fsadm.sh +++ b/scripts/fsadm.sh @@ -43,7 +43,6 @@ RMDIR=rmdir BLOCKDEV=blockdev BLKID=blkid GREP=grep -CUT=cut READLINK=readlink READLINK_E="-e" FSCK=fsck @@ -158,8 +157,10 @@ detect_fs() { VOLUME=${1#/dev/} VOLUME=$($READLINK $READLINK_E -n "/dev/$VOLUME") || error "Cannot get readlink $1" # use /dev/null as cache file to be sure about the result - # use 'cut' to be compatible with older version of blkid that does not provide option '-o value' - FSTYPE=$($BLKID -c /dev/null -s TYPE "$VOLUME" | $CUT -d \" -f 2) || error "Cannot get FSTYPE of \"$VOLUME\"" + # not using option '-o value' to be compatible with older version of blkid + FSTYPE=$($BLKID -c /dev/null -s TYPE "$VOLUME") || error "Cannot get FSTYPE of \"$VOLUME\"" + FSTYPE=${FSTYPE##*TYPE=\"} # cut quotation marks + FSTYPE=${FSTYPE%%\"*} verbose "\"$FSTYPE\" filesystem found on \"$VOLUME\"" } @@ -360,7 +361,7 @@ test -n "$FSADM_RUNNING" && exit 0 test -n "$TUNE_EXT" -a -n "$RESIZE_EXT" -a -n "$TUNE_REISER" -a -n "$RESIZE_REISER" \ -a -n "$TUNE_XFS" -a -n "$RESIZE_XFS" -a -n "$MOUNT" -a -n "$UMOUNT" -a -n "$MKDIR" \ -a -n "$RMDIR" -a -n "$BLOCKDEV" -a -n "$BLKID" -a -n "$GREP" -a -n "$READLINK" \ - -a -n "$FSCK" -a -n "$XFS_CHECK" -a -n "LVRESIZE" -a -n "$CUT" \ + -a -n "$FSCK" -a -n "$XFS_CHECK" -a -n "LVRESIZE" \ || error "Required command definitions in the script are missing!" $($READLINK -e -n / >/dev/null 2>&1) || READLINK_E="-f" |