"Rein" writes: > This is likely due to me not speaking Perl, but what's the best way to > achieve <subj>? > > Here's how it works for me now -- is there a better way? > > I'm using an expect script to shut the computer down after the backup > completes, but I don't want the output of that script to end up in the > transfer log, because it contains the password. > > For some reason expect's own "fork ... disconnect" routine doesn't work > when BackupPC executes the script as DumpPostUserCmd. > > Setting > $Conf{DumpPostUserCmd} = 'shutd.sh $host > /dev/null'; > > didn't work also -- the '> /dev/null' part is passed as an argument to the > 'shutd.sh' script. > > So right now I'm using a wrapper script that takes the hostname as an > argument and calls the original expect script, directing it's output to > /dev/null.
To improve security, BackupPC doesn't use a shell to execute commands - it forks and execs the commands directly. So any shell constructs, like redirection, don't work. Your approach of using a wrapper shell script it the right one. Craig ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642 _______________________________________________ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/backuppc-users http://backuppc.sourceforge.net/