vboxadd-timesync.sh revision da5293b4b0422bf0a8cf0a3018144cf2f56cf855
#
# InnoTek VirtualBox
#
# Linux Additions timesync daemon init script
#
# Copyright (C) 2006 InnoTek Systemberatung GmbH
#
# This file is part of VirtualBox Open Source Edition (OSE), as
# available from http://www.virtualbox.org. This file is free software;
# General Public License as published by the Free Software Foundation,
# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
# distribution. VirtualBox OSE is distributed in the hope that it will
# be useful, but WITHOUT ANY WARRANTY of any kind.
#
# If you received this file as part of a commercial VirtualBox
# distribution, then only the terms of your commercial VirtualBox
# license agreement apply instead of the previous paragraph.
#
# chkconfig: 35 35 56
# description: VirtualBox Additions timesync
#
### BEGIN INIT INFO
# Provides: vboxadd-timesync
# Required-Start: vboxadd
# Required-Stop: vboxadd
# Default-Start: 3 5
# Default-Stop:
# Description: VirtualBox Additions timesync
### END INIT INFO
if [ -f /etc/redhat-release ]; then
elif [ -f /etc/SuSE-release ]; then
elif [ -f /etc/debian_version ]; then
elif [ -f /etc/gentoo-release ]; then
elif [ -f /etc/slackware-version ]; then
else
echo "$0: Unknown system" 1>&2
fi
echo
}
echo
}
fi
}
rc_status -v
}
rc_status -v
}
fi
}
}
echo "...fail!"
}
echo "...done."
}
fi
. /sbin/functions.sh
}
}
echo "...fail!"
}
echo "...done."
}
shift
fi
fi
echo "...fail!"
}
echo "...done."
}
echo -n $1
}
fi
test -x "$binary" || {
echo "Cannot run $binary"
exit 1
}
}
if ! test -f $PIDFILE; then
echo -n "Starting vboxadd-timesync ";
vboxaddrunning || {
echo "VirtualBox Additions module not loaded!"
exit 1
}
RETVAL=$?
fi
return $RETVAL
}
stop() {
if test -f $PIDFILE; then
echo -n "Stopping vboxadd-timesync";
vboxaddrunning || {
echo "VirtualBox Additions module not loaded!"
exit 1
}
RETVAL=$?
fi
return $RETVAL
}
stop && start
}
}
case "$1" in
;;
stop)
stop
;;
;;
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
esac
exit $RETVAL