( cd usr/lib ; rm -rf libax25.so )
( cd usr/lib ; ln -sf libax25.so.0.0.0 libax25.so )
( cd usr/lib ; rm -rf libax25.so.0 )
( cd usr/lib ; ln -sf libax25.so.0.0.0 libax25.so.0 )
( cd usr/lib ; rm -rf libax25io.so )
( cd usr/lib ; ln -sf libax25io.so.0.0.0 libax25io.so )
( cd usr/lib ; rm -rf libax25io.so.0 )
( cd usr/lib ; ln -sf libax25io.so.0.0.0 libax25io.so.0 )
# Process the incoming configuration files

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

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

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

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