On Fri, Feb 7, 2014 at 4:34 PM,  <supp...@vip-consult.co.uk> wrote:
> The script content
>
> #! /bin/bash
>
> SERVER=$1
>
> echo "Dumping package List on: $SERVER"
> /usr/bin/ssh -q -x -l root -o ConnectTimeout=10 $SERVER  dpkg
> --get-selections > /etc/dpkg.list
> if [[ $? -ne 0 ]]; then
>         ssh -q -x -l root -o ConnectTimeout=10 $SERVER  rpm -qa >
> /etc/dpkg.list
>         if [[ $? -ne 0 ]]; then
>         echo "Cannot connect to $SERVER"
>         fi
>         exit
> fi

Which machine is supposed to get the /etc/dpkg.list file?    The
redirection is unquoted so it is going to be written locally - in
/etc, by the backuppc user who probably doesn't have permission.   If
you intended it to be on the remote machine, written as root, enclose
the entire remote command in single quotes so the remote shell will
parse the redirection instead of the local one.

-- 
  Les Mikesell
     lesmikes...@gmail.com

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/

Reply via email to