Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37758612
en ru br
Репозитории ALT
S:1.39-alt9
5.1: 1.28-alt1
4.1: 1.17-alt1.1
4.0: 1.14-alt1
www.altlinux.org/Changes

Группа :: Система/Ядро и оборудование
Пакет: pommed

 Главная   Изменения   Спек   Патчи   Исходники   Загрузить   Gear   Bugs and FR  Repocop 

#!/bin/sh
#
# pommed - Apple laptops hotkeys event handler
#
# chkconfig: 2345 36 90
# description: pommed handles the hotkeys found on the Apple MacBook Pro \
# and MacBook laptops and adjusts the LCD backlight, sound \
# volume, keyboard backlight or ejects the CD-ROM drive \
# accordingly.
# processname: pommed
# config: /etc/pommed.conf
# pidfile: /var/run/pommed.pid
### BEGIN INIT INFO
# Provides: pommed
# Required-Start: $local_fs messagebus
# Required-Stop: $local_fs messagebus
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Apple laptops hotkeys event handler
# Description: pommed handles the hotkeys found on the Apple MacBook Pro \
# and MacBook laptops and adjusts the LCD backlight, sound \
# volume, keyboard backlight or ejects the CD-ROM drive \
# accordingly.
### END INIT INFO

# Do not load RH compatibility interface.
WITHOUT_RC_COMPAT=1

# Source function library.
. /etc/init.d/functions

PIDFILE=/var/run/pommed.pid
LOCKFILE=/var/lock/subsys/pommed
RETVAL=0

start()
{
action "Loading applesmc kernel module:" modprobe applesmc
start_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user root -- pommed
RETVAL=$?
return $RETVAL
}

stop()
{
stop_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user root -- pommed
RETVAL=$?
return $RETVAL
}

restart()
{
stop
start
}

reload()
{
restart
}

# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
reload)
reload
;;
restart)
restart
;;
condstop)
if [ -e "$LOCKFILE" ]; then
stop
fi
;;
condrestart)
if [ -e "$LOCKFILE" ]; then
restart
fi
;;
condreload)
if [ -e "$LOCKFILE" ]; then
reload
fi
;;
status)
status --pidfile "$PIDFILE" --expect-user root -- pommed
RETVAL=$?
;;
*)
msg_usage "${0##*/} {start|stop|reload|restart|condstop|condrestart|condreload|status}"
RETVAL=1
esac

exit $RETVAL
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin