On Wed, 2008-09-17 at 07:48 +0100, Ghee Teo wrote:
> #!/bin/sh
> #
> # Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
> # Use is subject to license terms.
> #
> # Preinstall script will check if zfssnap role already exists
> # and add it if necessary
> /usr/bin/grep "^zfssnap:" $BASEDIR/etc/passwd > /dev/null
> if [ $? -ne 0 ]; then
>     /usr/sbin/roleadd -d /export/home/zfssnap -c "ZFS Automatic Snapshots 
> role" \
> 
> GT> You are making the assumption that /export/home is available on the 
> machine
>     which I don't think it is always correct. I know users-admin does use 
> /export/home
>     as default, not sure if it checks for its presence or not.
> 
>     -P "ZFS File System Management" \
>     -A solaris.smf.manage.zfs-auto-snapshot -m zfssnap
>     /usr/bin/passwd -r files -N zfssnap
>     # make sure zfssnap's PATH has /usr/sbin in it
>     echo "PATH=/usr/sbin:/usr/bin" >> /export/home/zfssnap/.profile
>     echo "export PATH" >> /export/home/zfssnap/.profile
> fi

Actually, this is totally wrong.  On Nevada, it would try to add a
role on the system where the installer is running (e.g. the install DVD
or the BE you're LUing from) and on the system you're
installing/upgrading.  I'm also wondering why a role needs a home
directory, is it only for adding /usr/sbin to the PATH?  Can you
not make zfs-auto-snapshot not depend on /usr/sbin being in the PATH?

I know I asked you about this but forgot the answer: is this package
going into Nevada?

Laca



Reply via email to