[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [linux-lvm] IOP selection scripts (was: '/etc/init.d/lvm' scriptin debian package)

On Thu, 21 Dec 2000, Andreas Dilger wrote:

> Why not simply install it as one of the commands (e.g. vgscan) and make
> hard links to it.  Hard links don't even take up inodes - only directory
> entries.

Uhm.. yes, why not?

> gcc -I . -I lib -o lvmiopversion lvmiopversion.c lib/lvm_get_iop_version.c
> 	lib/lvm_check_special.c
> and stripped it is only 4408 bytes on my system.

Ok, lvm-base SRPM updated and uploaded to

Using hardlinks and lvmiopversion the script becomes:

# This is a wrapper to call the appropriate LVM userspace tools based
# on the IOP version in use.
# 20001221  Claudio Matsuoka <clausio conectiva com>
# - using lvmiopversion to get the IOP version
# 20001220  Andreas Dilger <adilger turbolinux com>
# - fixed return values
# - better error messages
# 20001217  Claudio Matsuoka <claudio conectiva com>
# - first version

util=`basename $0`

if [ ! -x $iopver ]; then
    echo "$util: $iopver not found (can't determine IOP version)" 1>&2
    exit 1


if [ ! -d $liblvm ]; then
    echo "$util: $liblvm not found.  Is $lvmpkg installed?" 1>&2
    exit 3

exec $liblvm/$util "$@" # this will print out a localized error message for us

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]