Brian Cameron schrieb: > 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. >
Do you have a specific zone-based setup in mind where this would be useful? I'd suppose that in most cases multiple zones would either share home directories or else an identical user name in multiple zones may refer to different real users. I any case separate home directories usually indicate separate (different) configurations, so I'd expect simultaneous cleanup to be a rare occasion. At first sight a simple -z zone option for gnome-cleanup looks useful for administrators, but I would think that this should be done via zlogin. OTOH administrative gnome-cleanup done by user name may not be a good idea in the first place, because in general local administrators don't have appropriate access to network based resources. Maybe it would be a better idea to have a parameter to pass the home directory location to gnome-cleanup, so admins can determine the configuration to clean up as appropriate, even if the host/zone the home directory resides on has a different view of it (and of the user account) than the host/zone from which the user logs in. > [...] 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. That is a very specific setup. > 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) That surely wouldn't work. You may have automounter maps from a remote name service involved (which may in turn be configured per-zone). You may have executable automounter maps. You can encounter networked resources you should leave alone (or can't get to) anywhere in the resolution. > 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? > I'm not sure you want to achieve the right thing. - Joerg -- Joerg Barfurth phone: +49 40 23646662 / x66662 Software Engineer mailto:joerg.barfurth at sun.com Desktop Technology http://reserv.ireland/twiki/bin/view/Argus/ Thin Client Software http://www.sun.com/software/sunray/ Sun Microsystems GmbH http://www.sun.com/software/javadesktopsystem/
