#!/bin/sh



already=`grep "correctclock" /etc/crontab.local`
if [ ! -z "$already" ]; then
    if [ ! `whoami` = "root" ]; then
	    echo "must be root"
	    exit 1
    fi

    cp /etc/crontab.local /etc/crontab.local.old
    grep -v "correctclock" /etc/crontab.local.old > /etc/crontab.local
    if [ -f /usr/local/bin/correctclock ]; then
	    rm /usr/local/bin/correctclock
    fi
    
    if [ -f /usr/adm/correctclock.date ]; then
	    rm /usr/adm/correctclock.date
    fi
    if [ -f /usr/adm/correctclock.log ]; then
	    rm /usr/adm/correctclock.log
    fi
    echo "Deinstalled"

else
	echo " correctclock was not installed"
fi


