From: <bac...@ko...> - 2013-02-13 23:11:20
|
Shawn T Perry wrote at about 20:15:42 -0700 on Tuesday, February 12, 2013: > I think that will let go of the connection before rsync is actually setup. > > I have a VERY hackish solution, though I would definately like > something cleaner. I have added a command to find and kill the sshd > it came in on. It works, but I need to add in an sshd restart every > morning. First of all, this is an *awful* hack and as I mentioned in my previous response, the problem is not ssh but that something (at? vss? dosdev? rsyncd?) is hanging in the script preventing return of control. Second, it seems like you are killing both the ssh client and the sshd daemon -- not so clever. If you just killed the ssh client then you wouldn't need to restart the daemon... Third, killing ssh means you don't get any feedback on whether the shadows and rsyncd set up correctly... this can lead to *bad* results since backuppc will have no way of knowing if the shadows actually set up properly. Remind me again why you have not posted a copy of the log so we can see *exactly* what is going wrong... the log pretty clearly traces what is happening, in which recursive iteration of calls, and where... You can get even more detail by adding "set +x" as a first line in the bash script then you will see each line of the script printed as executed... > > if [ $RETURN -le 0 ] ; then #No error > for ((WAIT=1; WAIT <=SHORTTIME; WAIT++)) ; do # Wait > for rsync to set up > if [ -e "$RSYNCDPID" ]; then > [ -n "$LOG" ] && echo -e "..Rsyncd > started successfully (PID=$(< $RSYNCDPID))...$PASS\n" >> $LOG > -> ps -s |grep sshd |tail -n 1 | cut > -c-8 | xargs kill -f > exit 0 # Exit 0 on success > fi > sleep 1 > done > [ -n "$LOG" ] && echo -e "--Rsyncd failed to > start...$PASS\n" >> $LOG > RETURN=10 # Rsyncd failed to start > fi > clean_up # Clean up on failure... > exit $RETURN # Return failure code > > > On Tue, Feb 12, 2013 at 8:55 AM, Les Mikesell <les...@gm...> wrote: > > On Tue, Feb 12, 2013 at 9:42 AM, Shawn T Perry <sh...@re...> wrote: > >> Does anyone else have any idea on how to solve this problem? > >> > > > > Did you try the I/O redirection on any commands that will keep > > running? Or using 'ssh -n'? > > > > -- > > Les Mikesell > > les...@gm... > > > > ------------------------------------------------------------------------------ > > Free Next-Gen Firewall Hardware Offer > > Buy your Sophos next-gen firewall before the end March 2013 > > and get the hardware for free! Learn more. > > http://p.sf.net/sfu/sophos-d2d-feb > > _______________________________________________ > > BackupPC-users mailing list > > Bac...@li... > > List: https://lists.sourceforge.net/lists/listinfo/backuppc-users > > Wiki: http://backuppc.wiki.sourceforge.net > > Project: http://backuppc.sourceforge.net/ > > ------------------------------------------------------------------------------ > Free Next-Gen Firewall Hardware Offer > Buy your Sophos next-gen firewall before the end March 2013 > and get the hardware for free! Learn more. > http://p.sf.net/sfu/sophos-d2d-feb > _______________________________________________ > BackupPC-users mailing list > Bac...@li... > List: https://lists.sourceforge.net/lists/listinfo/backuppc-users > Wiki: http://backuppc.wiki.sourceforge.net > Project: http://backuppc.sourceforge.net/ |