I am trying to modify the gnome-cleanup script (refer to "man
gnome-cleanup) so it will work in a zones environment.  I want to make
it work so that if you run it as root, you can specify a userid, then it
will clean away the user's GNOME configuration files in all zones.

First I get the users $HOME directory by running:

    /usr/bin/echo ~userid

    This returns "/home/userid"

Second, I get the zone names by running this command:

/usr/sbin/zoneadm list -cv | grep running | grep -v global |
    nawk '{ print $4}'

Then I loop over the values returned.  For each value, lets
call it $ZONE_PATH, I then try to access the user's home
directory by accessing:

$ZONE_PATH/root/home/userid

However, this directory doesn't exist because the real user's
home directory is $ZONE_PATH/root/export/home/userid.  It seems
that this gets mapped to $ZONE_PATH/root/home/userid by
/etc/auto_home.

Is there any way (short of parsing the /etc/auto_home file
directly) to figure out what the user's $HOME directory really
is when the mounts are not yet setup?  Or is there a way to
cause the mounts to get set up so that the
$ZONE_PATH/root/home/userid directory will exist?  Or is there
a better way to achieve what I am trying to do?

Thanks,

Brian

Reply via email to