( cd usr/bin ; rm -rf hqx2bin )
( cd usr/bin ; ln -sf megatron hqx2bin )
( cd usr/bin ; rm -rf macbinary )
( cd usr/bin ; ln -sf megatron macbinary )
( cd usr/bin ; rm -rf single2bin )
( cd usr/bin ; ln -sf megatron single2bin )
( cd usr/bin ; rm -rf unbin )
( cd usr/bin ; ln -sf megatron unbin )
( cd usr/bin ; rm -rf unhex )
( cd usr/bin ; ln -sf megatron unhex )
( cd usr/bin ; rm -rf unsingle )
( cd usr/bin ; ln -sf megatron unsingle )
( cd usr/lib/atalk/filters ; rm -rf ifmpap )
( cd usr/lib/atalk/filters ; ln -sf /usr/sbin/psf ifmpap )
( cd usr/lib/atalk/filters ; rm -rf ifmpaprev )
( cd usr/lib/atalk/filters ; ln -sf /usr/sbin/psf ifmpaprev )
( cd usr/lib/atalk/filters ; rm -rf ifpap )
( cd usr/lib/atalk/filters ; ln -sf /usr/sbin/psf ifpap )
( cd usr/lib/atalk/filters ; rm -rf ifpaprev )
( cd usr/lib/atalk/filters ; ln -sf /usr/sbin/psf ifpaprev )
( cd usr/lib/atalk/filters ; rm -rf ifwmpap )
( cd usr/lib/atalk/filters ; ln -sf /usr/sbin/psf ifwmpap )
( cd usr/lib/atalk/filters ; rm -rf ifwmpaprev )
( cd usr/lib/atalk/filters ; ln -sf /usr/sbin/psf ifwmpaprev )
( cd usr/lib/atalk/filters ; rm -rf ifwpap )
( cd usr/lib/atalk/filters ; ln -sf /usr/sbin/psf ifwpap )
( cd usr/lib/atalk/filters ; rm -rf ifwpaprev )
( cd usr/lib/atalk/filters ; ln -sf /usr/sbin/psf ifwpaprev )
( cd usr/lib/atalk/filters ; rm -rf ofmpap )
( cd usr/lib/atalk/filters ; ln -sf /usr/sbin/psf ofmpap )
( cd usr/lib/atalk/filters ; rm -rf ofpap )
( cd usr/lib/atalk/filters ; ln -sf /usr/sbin/psf ofpap )
( cd usr/lib/atalk/filters ; rm -rf ofwmpap )
( cd usr/lib/atalk/filters ; ln -sf /usr/sbin/psf ofwmpap )
( cd usr/lib/atalk/filters ; rm -rf ofwpap )
( cd usr/lib/atalk/filters ; ln -sf /usr/sbin/psf ofwpap )
( cd usr/lib/atalk/filters ; rm -rf tfmpap )
( cd usr/lib/atalk/filters ; ln -sf /usr/sbin/psf tfmpap )
( cd usr/lib/atalk/filters ; rm -rf tfmpaprev )
( cd usr/lib/atalk/filters ; ln -sf /usr/sbin/psf tfmpaprev )
( cd usr/lib/atalk/filters ; rm -rf tfpap )
( cd usr/lib/atalk/filters ; ln -sf /usr/sbin/psf tfpap )
( cd usr/lib/atalk/filters ; rm -rf tfpaprev )
( cd usr/lib/atalk/filters ; ln -sf /usr/sbin/psf tfpaprev )
( cd usr/lib/atalk/filters ; rm -rf tfwmpap )
( cd usr/lib/atalk/filters ; ln -sf /usr/sbin/psf tfwmpap )
( cd usr/lib/atalk/filters ; rm -rf tfwmpaprev )
( cd usr/lib/atalk/filters ; ln -sf /usr/sbin/psf tfwmpaprev )
( cd usr/lib/atalk/filters ; rm -rf tfwpap )
( cd usr/lib/atalk/filters ; ln -sf /usr/sbin/psf tfwpap )
( cd usr/lib/atalk/filters ; rm -rf tfwpaprev )
( cd usr/lib/atalk/filters ; ln -sf /usr/sbin/psf tfwpaprev )
# Process the incoming configuration files

if [ ! -f etc/AppleVolumes.default ]
then
   mv install/conf/etc/AppleVolumes.default etc/AppleVolumes.default
else
   if [ "`md5sum install/conf/etc/AppleVolumes.default | cut -d ' ' -f 1 2>/dev/null`" = "`md5sum etc/AppleVolumes.default | cut -d ' ' -f 1 2>/dev/null`" ]
   then
      mv install/conf/etc/AppleVolumes.default etc/AppleVolumes.default
   else
      rm install/conf/etc/AppleVolumes.default
   fi
fi

if [ ! -f etc/AppleVolumes.system ]
then
   mv install/conf/etc/AppleVolumes.system etc/AppleVolumes.system
else
   if [ "`md5sum install/conf/etc/AppleVolumes.system | cut -d ' ' -f 1 2>/dev/null`" = "`md5sum etc/AppleVolumes.system | cut -d ' ' -f 1 2>/dev/null`" ]
   then
      mv install/conf/etc/AppleVolumes.system etc/AppleVolumes.system
   else
      rm install/conf/etc/AppleVolumes.system
   fi
fi

if [ ! -f etc/atalkd.conf ]
then
   mv install/conf/etc/atalkd.conf etc/atalkd.conf
else
   if [ "`md5sum install/conf/etc/atalkd.conf | cut -d ' ' -f 1 2>/dev/null`" = "`md5sum etc/atalkd.conf | cut -d ' ' -f 1 2>/dev/null`" ]
   then
      mv install/conf/etc/atalkd.conf etc/atalkd.conf
   else
      rm install/conf/etc/atalkd.conf
   fi
fi

if [ ! -f etc/papd.conf ]
then
   mv install/conf/etc/papd.conf etc/papd.conf
else
   if [ "`md5sum install/conf/etc/papd.conf | cut -d ' ' -f 1 2>/dev/null`" = "`md5sum etc/papd.conf | cut -d ' ' -f 1 2>/dev/null`" ]
   then
      mv install/conf/etc/papd.conf etc/papd.conf
   else
      rm install/conf/etc/papd.conf
   fi
fi

if [ ! -f etc/afpd.conf ]
then
   mv install/conf/etc/afpd.conf etc/afpd.conf
else
   if [ "`md5sum install/conf/etc/afpd.conf | cut -d ' ' -f 1 2>/dev/null`" = "`md5sum etc/afpd.conf | cut -d ' ' -f 1 2>/dev/null`" ]
   then
      mv install/conf/etc/afpd.conf etc/afpd.conf
   else
      rm install/conf/etc/afpd.conf
   fi
fi

if [ ! -f etc/rc.d/rc.atalk ]
then
   mv install/conf/etc/rc.d/rc.atalk etc/rc.d/rc.atalk
else
   if [ "`md5sum install/conf/etc/rc.d/rc.atalk | cut -d ' ' -f 1 2>/dev/null`" = "`md5sum etc/rc.d/rc.atalk | cut -d ' ' -f 1 2>/dev/null`" ]
   then
      mv install/conf/etc/rc.d/rc.atalk etc/rc.d/rc.atalk
   else
      rm install/conf/etc/rc.d/rc.atalk
   fi
fi

# Make sure the incoming conf directory is gone
rm -rf install/conf
