Subject: Re: [vserver] Check tagxid
From: "Daniel Hokka Zakrisson" <daniel@hozac.com>
Date: Thu, 12 Jun 2008 14:40:39 +0200 (CEST)

Andre Timmermann wrote:
> Hello list,
>
> I am using linux-vserver on different machines, and now I discoverded a
> small problem with my management-scripts ;)
>
> In order to enforce disklimits per vserver, i am using the mopuntoption
> "tagxid"
>
> One of my scripts makes a check before it executes commands:
>
> # check if tagxid is active
> TAG=`mount | grep tagxid`
> if [ -z "$TAG" ]; then echo "tagxid ist not active." ; exit 1; fi
>
> Normally it works, bit I have one machine, which does not show the
> option "tagxid", it shows "tag" instead:
>
> :~# mount | grep vservers
> /dev/md3 on /var/lib/vservers type ext3 (rw,tag,data=ordered)
>
> Is there a more intelligent way to determine if the option tagxid is
> active?

if showattr -d <mount point> | grep -q X; then
    # Tagging enabled
else
    # Tagging disabled
fi

-- 
Daniel Hokka Zakrisson