=================================================================== RCS file: /cvs/palm/manage_pre/manage_pre,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- palm/manage_pre/manage_pre 2009/08/12 21:08:23 1.2 +++ palm/manage_pre/manage_pre 2009/08/20 22:38:37 1.3 @@ -1,8 +1,9 @@ #!/bin/sh -# $Id: manage_pre,v 1.2 2009/08/12 20:08:23 andrew Exp $ +# $Id: manage_pre,v 1.3 2009/08/20 21:38:37 andrew Exp $ -local _pre_label='Pre' -local _ipod_label='iPod' +local _pre_id='Palm, Pre, 0316' +#local _pre_label='Pre' +#local _ipod_label='iPod' local _mount_dir='/mnt/pre' local _name=`basename $0` local _unison_config='vogonpa' @@ -32,9 +33,9 @@ exit 1 fi - local _label=`disklabel ${_dev} 2>/dev/null | awk '/^label:/ { print $2 }'` - if [ X"$_label" != X"$_pre_label" -a X"$_label" != X"$_ipod_label" ]; then - echo "Pre not labeled properly [$_label]" >&2 + local _id=`dmesg | grep "^$_dev at " | tail -1 | sed -e 's/.*.*$//'` + if [ X"$_id" != X"$_pre_id" ]; then + echo "Pre [$_dev] not correct id [$_id]" >&2 exit 2 fi @@ -84,7 +85,7 @@ #fi if [ -e /usr/local/bin/unison ]; then - /usr/local/bin/unison $_unison_config + /usr/local/bin/unison $_unison_config -auto -batch -ui text fi }