=================================================================== RCS file: /cvs/palm/manage_pre/manage_pre,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- palm/manage_pre/manage_pre 2009/08/20 22:41:24 1.5 +++ palm/manage_pre/manage_pre 2009/09/21 19:00:06 1.6 @@ -1,5 +1,5 @@ #!/bin/sh -# $Id: manage_pre,v 1.5 2009/08/20 21:41:24 andrew Exp $ +# $Id: manage_pre,v 1.6 2009/09/21 18:00:06 andrew Exp $ local _pre_id='Palm, Pre, 0316' #local _pre_label='Pre' @@ -72,9 +72,10 @@ synchronize() { local _mounted=`is_mounted $_dev` + local _did_mount="" if [ X"" == X"$_mounted" ]; then - echo Not mounted - return 1 + mount || exit 255 + _did_mount=1 fi echo Synchronizing Pre @@ -86,6 +87,10 @@ if [ -e /usr/local/bin/unison ]; then /usr/local/bin/unison $_unison_config -auto -batch -ui text + fi + + if [ ! -z "$_did_mount" ]; then + eject fi }