( cd usr/man/man1 ; rm -rf uugetty.1.gz )
( cd usr/man/man1 ; ln -sf getty.1.gz uugetty.1.gz )
# Process the incoming configuration files

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

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

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

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

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

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

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

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