vboxadd-timesync.sh revision 743e930caaabf7460c3f885ad4ebd54cea85c731
#
# Sun xVM VirtualBox
# Linux Additions timesync daemon init script
#
# Copyright (C) 2006-2007 Sun Microsystems, Inc.
#
# 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 (GPL) 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.
#
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
# Clara, CA 95054 USA or visit http://www.sun.com if you need
# additional information or have any questions.
#
# chkconfig: 35 35 56
# description: VirtualBox Additions timesync
#
### BEGIN INIT INFO
# Provides: vboxadd-timesync
# Required-Start: vboxadd
# Required-Stop: vboxadd
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# 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
fi
if [ -z "$NOLSB" ]; then
echo ""
log_failure_msg "$1"
}
}
log_daemon_msg "$@"
}
else
if [ "$system" = "redhat" ]; then
echo -n " "
echo
echo " ($1)"
}
echo -n " "
echo
}
elif [ "$system" = "suse" ]; then
rc_status -v
echo " ($1)"
}
rc_status -v
}
elif [ "$system" = "gentoo" ]; then
. /sbin/functions.sh
eerror "$1"
}
eend "$?"
}
ebegin "$1"
}
shift
fi
else
echo " ...failed!"
echo " ($1)"
}
echo " ...done."
}
fi
if [ "$system" != "gentoo" ]; then
[ -z "${1:-}" ] && return 1
if [ -z "${2:-}" ]; then
echo -n "$1"
else
echo -n "$1: $2"
fi
}
fi
fi
if [ "$system" = "redhat" ]; then
elif [ "$system" = "suse" ]; then
}
elif [ "$system" = "debian" ]; then
}
}
elif [ "$system" = "gentoo" ]; then
}
}
else
fi
fi
test -x "$binary" || {
echo "Cannot run $binary"
exit 1
}
}
if ! test -f $PIDFILE; then
vboxaddrunning || {
failure "VirtualBox Additions module not loaded!"
}
RETVAL=$?
fi
return $RETVAL
}
stop() {
if test -f $PIDFILE; then
vboxaddrunning || {
failure "VirtualBox Additions module not loaded!"
}
RETVAL=$?
fi
return $RETVAL
}
stop && start
}
}
case "$1" in
;;
stop)
stop
;;
;;
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
esac
exit $RETVAL