Hi Cristine,

I tried both methods on OpenSolaris 2008.11 and they worked for me. My guess is that there's something wrong with your script. Perhaps you forgot to close a control construct (e.g., end an if block with fi).

If it's not the script, then what version of Solaris/OpenSolaris are you running?

Jordan

/*
 * Jordan Vaughan
 * Solaris Kernel Developer
 * jordan.vaug...@sun.com
 * blogs.sun.com/lunchware
 */


On 02/13/09 16:48, Christine Tran wrote:
I'm writing a script that adds an LOFS to a zone, using a pre-made
batch file it works but I rather generate this on the fly.
It looks something like this:

if [ something ]; then
   zonecfg -z $myzone << EOF
    add fs
    set dir=/tmp/foo
    set special=/tmp/foo
    set type=lofs
    add options rw
    add options nodevices
    end
    commit
    exit
  EOF
  zoneadm -z $ZONENAME boot

This should work, but I get a syntax error at line 78: `end of file'
unexpected, (script is only 77 lines long, btw.)  I also tried

cat > /tmp/foo << EOF
...
EOF
zonecfg -z $myzone -f /tmp/foo

but same problem.  How can I solve this?  I prefer not to keep a batch
file around to slice & dice with sed.

CT
_______________________________________________
zones-discuss mailing list
zones-discuss@opensolaris.org
_______________________________________________
zones-discuss mailing list
zones-discuss@opensolaris.org

Reply via email to