I'm having a wee bit of bother with a korn shell script that drives dump:

The guts of the script:

        dump="${dump} -${level}${dump_flags} ${device} | gzip -9"
        if [[ ! -z ${encryption} ]]; then
                dump="${dump} | ${encryption} -pass file:${conf}.passwd -out"
        else
                dump="${dump} -o"
        fi
        [ ${debug} ] && echo "${dump} ${file}\n"
        ${dump} ${file}
        [ ${digest} ] && ${digest} ${file} > ${checksum}
        # cp locally, overwriting previous file of same name
        # scp offsite &

The output:

dump -6anu -f - -h 0 /dev/wd0g | gzip -9 | openssl enc -bf -salt -pass 
file:/etc/dumpster/teak.dumpster_slices.conf.passwd -out 
/tmp/tmp.MEuYIi9135/teak/_var_mail_6_Friday.dump.gz.crypto

Excess arguments to dump: | gzip -9 | openssl enc -bf -salt -pass 
file:/etc/dumpster/teak.dumpster_slices.conf.passwd -out 
/tmp/tmp.MEuYIi9135/teak/_var_mail_6_Friday.dump.gz.crypto

sha1: cannot open /tmp/tmp.MEuYIi9135/teak/_var_mail_6_Friday.dump.gz.crypto: 
No such file or directory



I thought it was due to the way that I had put in the encryption stuff
as it was working until then, but when I run it again without
encryption; same, same:


dump -6anu -f - -h 0 /dev/wd0g | gzip -9 -o 
/tmp/tmp.qGWnO29107/teak/_var_mail_6_Friday.dump.gz

Excess arguments to dump: | gzip -9 -o 
/tmp/tmp.qGWnO29107/teak/_var_mail_6_Friday.dump.gz

sha1: cannot open /tmp/tmp.qGWnO29107/teak/_var_mail_6_Friday.dump.gz: No such 
file or directory


Nae gud....  src/sbin/dump/main.c shows:

        if (dirlist == 0) {
                disk = *argv++;
                if (argc != 1) {
                        (void)fputs("Excess arguments to dump:", stderr);
                        while (--argc) {
                                (void)putc(' ', stderr);
                                (void)fputs(*argv++, stderr);
                        }
                        (void)putc('\n', stderr);
                        exit(X_STARTUP);
                }
        }



If I run the full command manually, it works as expected. Soooo, I
reckon there is something wrong with my script and the manner in which
it passes arguments to dump. Any suggestions?

-- 
Craig Skinner | http://www.kepax.co.uk | [EMAIL PROTECTED]

Reply via email to