mirror of
https://github.com/troglobit/finit.git
synced 2026-11-28 20:58:24 +00:00
Clean up unused and long since deprecated contrib files/patches
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
d60fc1ce62
commit
c44c217c4a
6 files changed
-453
No files matched your search
@@ -1,65 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
### BEGIN INIT INFO
|
|
||||||
# Provides: keyboard-setup
|
|
||||||
# Required-Start: mountkernfs
|
|
||||||
# Required-Stop:
|
|
||||||
# Should-Start: keymap udev
|
|
||||||
# X-Start-Before: checkroot
|
|
||||||
# Default-Start: S
|
|
||||||
# Default-Stop:
|
|
||||||
# X-Interactive: true
|
|
||||||
# Short-Description: Set preliminary keymap
|
|
||||||
# Description: Set the console keyboard as early as possible
|
|
||||||
# so during the file systems checks the administrator
|
|
||||||
# can interact. At this stage of the boot process
|
|
||||||
# only the ASCII symbols are supported.
|
|
||||||
### END INIT INFO
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# This script is not used by keyboard-configuration. It is used
|
|
||||||
# jointly by console-setup and console-setup-mini
|
|
||||||
|
|
||||||
test -f /bin/setupcon || exit 0
|
|
||||||
|
|
||||||
if [ -f /lib/lsb/init-functions ]; then
|
|
||||||
. /lib/lsb/init-functions
|
|
||||||
else
|
|
||||||
log_action_begin_msg () {
|
|
||||||
echo -n "$@... "
|
|
||||||
}
|
|
||||||
|
|
||||||
log_action_end_msg () {
|
|
||||||
if [ "$1" -eq 0 ]; then
|
|
||||||
echo done.
|
|
||||||
else
|
|
||||||
echo failed.
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
stop)
|
|
||||||
# keyboard-setup isn't a daemon
|
|
||||||
;;
|
|
||||||
start|force-reload|restart|reload)
|
|
||||||
case `readlink /proc/self/fd/2` in
|
|
||||||
/dev/tty[0-9]*|/dev/vc/[0-9]*|/dev/console)
|
|
||||||
log_action_begin_msg "Setting preliminary keymap"
|
|
||||||
if setupcon -k; then
|
|
||||||
log_action_end_msg 0
|
|
||||||
else
|
|
||||||
log_action_end_msg $?
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo 'Usage: /etc/init.d/keyboard-setup {start|reload|restart|force-reload|stop}'
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
@@ -1,81 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
### BEGIN INIT INFO
|
|
||||||
# Provides: acpid
|
|
||||||
# Required-Start: $remote_fs $syslog
|
|
||||||
# Required-Stop: $remote_fs $syslog
|
|
||||||
# X-Start-Before: kdm gdm xdm hal
|
|
||||||
# X-Stop-After: kdm gdm xdm hal
|
|
||||||
# Default-Start: 2 3 4 5
|
|
||||||
# Default-Stop:
|
|
||||||
# Short-Description: Start the Advanced Configuration and Power Interface daemon
|
|
||||||
# Description: Provide a socket for X11, hald and others to multiplex
|
|
||||||
# kernel ACPI events.
|
|
||||||
### END INIT INFO
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
ACPID="/usr/sbin/acpid"
|
|
||||||
DEFAULTS="/etc/default/acpid"
|
|
||||||
|
|
||||||
# Check for daemon presence
|
|
||||||
[ -x "$ACPID" ] || exit 0
|
|
||||||
|
|
||||||
OPTIONS=""
|
|
||||||
MODULES=""
|
|
||||||
# Include acpid defaults if available
|
|
||||||
[ -r "$DEFAULTS" ] && . "$DEFAULTS"
|
|
||||||
|
|
||||||
# Get lsb functions
|
|
||||||
. /lib/lsb/init-functions
|
|
||||||
|
|
||||||
# As the name says. If the kernel supports modules, it'll try to load
|
|
||||||
# the ones listed in "MODULES".
|
|
||||||
load_modules() {
|
|
||||||
[ -f /proc/modules ] || return 0
|
|
||||||
if [ "$MODULES" = "all" ]; then
|
|
||||||
MODULES="$(sed -rn 's#^(/lib/modules/[^/]+/)?kernel/(drivers|ubuntu)/acpi/([^/]+/)*(.*)\.ko:.*#\4#p' "/lib/modules/$(uname -r)/modules.dep")"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$MODULES" ]; then
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
log_begin_msg "Loading ACPI kernel modules..."
|
|
||||||
# work around a bug in initramfs which leaks this env var Launchpad #291619
|
|
||||||
# and a bug in modprobe --all --quiet which doesn't load all modules and
|
|
||||||
# exits with non-zero exit status Debian #504088
|
|
||||||
unset MODPROBE_OPTIONS
|
|
||||||
modprobe --all --use-blacklist $MODULES 2>/dev/null
|
|
||||||
log_end_msg $?
|
|
||||||
}
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
start)
|
|
||||||
load_modules || true
|
|
||||||
log_begin_msg "Starting ACPI services..."
|
|
||||||
start-stop-daemon --start --quiet --oknodo --exec "$ACPID" -- $OPTIONS
|
|
||||||
log_end_msg $?
|
|
||||||
;;
|
|
||||||
stop)
|
|
||||||
log_begin_msg "Stopping ACPI services..."
|
|
||||||
start-stop-daemon --stop --quiet --oknodo --retry 2 --exec "$ACPID"
|
|
||||||
log_end_msg $?
|
|
||||||
;;
|
|
||||||
restart)
|
|
||||||
$0 stop
|
|
||||||
sleep 1
|
|
||||||
$0 start
|
|
||||||
;;
|
|
||||||
reload|force-reload)
|
|
||||||
log_begin_msg "Reloading ACPI services..."
|
|
||||||
start-stop-daemon --stop --signal 1 --exec "$ACPID"
|
|
||||||
log_end_msg $?
|
|
||||||
;;
|
|
||||||
status)
|
|
||||||
status_of_proc "$ACPID" acpid
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
log_success_msg "Usage: /etc/init.d/acpid {start|stop|restart|reload|force-reload|status}"
|
|
||||||
exit 1
|
|
||||||
esac
|
|
||||||
|
|
||||||
@@ -1,259 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
### BEGIN INIT INFO
|
|
||||||
# Provides: kbd
|
|
||||||
# Required-Start: $remote_fs
|
|
||||||
# Required-Stop:
|
|
||||||
# Default-Start: S
|
|
||||||
# Default-Stop:
|
|
||||||
# X-Interactive: true
|
|
||||||
# Description: Set console screen modes and fonts
|
|
||||||
# Short-Description: Prepare console
|
|
||||||
### END INIT INFO
|
|
||||||
|
|
||||||
# This is the boot script for the `kbd' package.
|
|
||||||
# It loads parameters from /etc/kbd/config and maybe loads
|
|
||||||
# default font and map.
|
|
||||||
# (c) 1997 Yann Dirson
|
|
||||||
|
|
||||||
PKG=kbd
|
|
||||||
if [ -r /etc/$PKG/config ]; then
|
|
||||||
. /etc/$PKG/config
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -d /etc/$PKG/config.d ]; then
|
|
||||||
for i in `run-parts --list /etc/$PKG/config.d `; do
|
|
||||||
. $i
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
# do some magic with the variables for compatibility with the config
|
|
||||||
# file of console-tools
|
|
||||||
for vc in '' `set | grep "^.*_vc[0-9][0-9]*=" | sed 's/^.*\(_vc[0-9][0-9]*\)=.*/\1/'`
|
|
||||||
do
|
|
||||||
eval [ '"'\${SCREEN_FONT$vc}'"' ] && eval CONSOLE_FONT$vc=\${CONSOLE_FONT$vc:-\${SCREEN_FONT$vc}}
|
|
||||||
eval [ '"'\${SCREEN_FONT_MAP$vc}'"' ] && eval FONT_MAP$vc=\${FONT_MAP$vc:-\${SCREEN_FONT_MAP$vc}}
|
|
||||||
eval [ '"'\${APP_CHARSET_MAP$vc}'"' ] && eval CONSOLE_MAP$vc=\${CONSOLE_MAP$vc:-\${APP_CHARSET_MAP$vc}}
|
|
||||||
done
|
|
||||||
|
|
||||||
. /lib/lsb/init-functions
|
|
||||||
|
|
||||||
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
|
||||||
SETFONT_OPT="-v"
|
|
||||||
|
|
||||||
if which setupcon >/dev/null
|
|
||||||
then
|
|
||||||
HAVE_SETUPCON=yes
|
|
||||||
fi
|
|
||||||
|
|
||||||
# set DEVICE_PREFIX depending on devfs/udev
|
|
||||||
if [ -d /dev/vc ]; then
|
|
||||||
DEVICE_PREFIX="/dev/vc/"
|
|
||||||
else
|
|
||||||
DEVICE_PREFIX="/dev/tty"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# determine the system charmap
|
|
||||||
ENV_FILE=''
|
|
||||||
[ -r /etc/environment ] && ENV_FILE="/etc/environment"
|
|
||||||
[ -r /etc/default/locale ] && ENV_FILE="/etc/default/locale"
|
|
||||||
[ "$ENV_FILE" ] && CHARMAP=$(set -a && . "$ENV_FILE" && locale charmap)
|
|
||||||
if [ "$CHARMAP" = "UTF-8" -a -z "$CONSOLE_MAP" ]
|
|
||||||
then
|
|
||||||
UNICODE_MODE=yes
|
|
||||||
fi
|
|
||||||
|
|
||||||
reset_vga_palette ()
|
|
||||||
{
|
|
||||||
if [ -f /proc/fb ]; then
|
|
||||||
# They have a framebuffer device.
|
|
||||||
# That means we have work to do...
|
|
||||||
echo -n "]R"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
unicode_start_stop ()
|
|
||||||
{
|
|
||||||
vc=$1
|
|
||||||
if [ -n "$UNICODE_MODE" -a -z "`eval echo \\$CONSOLE_MAP_vc$vc`" ]; then
|
|
||||||
action=unicode_start
|
|
||||||
else
|
|
||||||
action=unicode_stop
|
|
||||||
fi
|
|
||||||
if [ "${CONSOLE_FONT}" ]; then
|
|
||||||
$action "${CONSOLE_FONT}" < ${DEVICE_PREFIX}$vc > ${DEVICE_PREFIX}$vc 2> /dev/null || true
|
|
||||||
else
|
|
||||||
$action < ${DEVICE_PREFIX}$vc > ${DEVICE_PREFIX}$vc 2> /dev/null || true
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
setup ()
|
|
||||||
{
|
|
||||||
# be sure the main program is installed
|
|
||||||
which setfont >/dev/null || return
|
|
||||||
|
|
||||||
VT="no"
|
|
||||||
# If we can't access the console, quit
|
|
||||||
CONSOLE_TYPE=`fgconsole 2>/dev/null` || return
|
|
||||||
|
|
||||||
if [ ! $CONSOLE_TYPE = "serial" ]; then
|
|
||||||
readlink /proc/self/fd/0 | grep -q -e /dev/vc -e '/dev/tty[^p]' -e /dev/console
|
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
VT="yes"
|
|
||||||
reset_vga_palette
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
[ $VT = "no" ] && return
|
|
||||||
|
|
||||||
# start vcstime
|
|
||||||
if [ "${DO_VCSTIME}" = "yes" ] && which vcstime >/dev/null; then
|
|
||||||
[ "$VERBOSE" != "no" ] && log_action_begin_msg "Starting clock on text console"
|
|
||||||
vcstime &
|
|
||||||
[ "$VERBOSE" != "no" ] && log_action_end_msg 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -d /etc/init ] && which initctl >/dev/null; then
|
|
||||||
# Upstart
|
|
||||||
LIST_CONSOLES=`cd /etc/init; find -name 'tty*.conf' -printf '%f ' | sed -e 's/[^0-9 ]//g'`
|
|
||||||
else
|
|
||||||
# traditional SysV init
|
|
||||||
LIST_CONSOLES=`sed -e '/^ *#/d' /etc/inittab | grep -e '\<tty[0-9]*\>' | awk -F: '{printf "%s ", $1}'`
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Global default font+map
|
|
||||||
if [ -z "${HAVE_SETUPCON}" -a "${CONSOLE_FONT}" ]; then
|
|
||||||
[ "$VERBOSE" != "no" ] && log_action_begin_msg "Setting up general console font"
|
|
||||||
sfm="${FONT_MAP}" && [ "$sfm" ] && sfm="-u $sfm"
|
|
||||||
acm="${CONSOLE_MAP}" && [ "$acm" ] && acm="-m $acm"
|
|
||||||
|
|
||||||
# Set for the first 6 VCs (as they are allocated in /etc/inittab)
|
|
||||||
for vc in $LIST_CONSOLES
|
|
||||||
do
|
|
||||||
if ! ( unicode_start_stop $vc \
|
|
||||||
&& setfont -C ${DEVICE_PREFIX}$vc ${SETFONT_OPT} $sfm ${CONSOLE_FONT} $acm )
|
|
||||||
then
|
|
||||||
[ "$VERBOSE" != "no" ] && log_action_end_msg 1
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
[ "$VERBOSE" != "no" ] && log_action_end_msg 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Default to Unicode mode for new VTs?
|
|
||||||
if [ -f /sys/module/vt/parameters/default_utf8 ]; then
|
|
||||||
if [ -n "$UNICODE_MODE" ]; then
|
|
||||||
echo 1
|
|
||||||
else
|
|
||||||
echo 0
|
|
||||||
fi > /sys/module/vt/parameters/default_utf8
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Per-VC font+sfm
|
|
||||||
PERVC_FONTS="`set | grep "^CONSOLE_FONT_vc[0-9]*=" | tr -d \' `"
|
|
||||||
if [ -z "${HAVE_SETUPCON}" -a "${PERVC_FONTS}" ]; then
|
|
||||||
[ "$VERBOSE" != "no" ] && log_action_begin_msg "Setting up per-VC fonts"
|
|
||||||
for font in ${PERVC_FONTS}
|
|
||||||
do
|
|
||||||
# extract VC and FONTNAME info from variable setting
|
|
||||||
vc=`echo $font | cut -b16- | cut -d= -f1`
|
|
||||||
eval font=\$CONSOLE_FONT_vc$vc
|
|
||||||
# eventually find an associated SFM
|
|
||||||
eval sfm=\${FONT_MAP_vc${vc}}
|
|
||||||
[ "$sfm" ] && sfm="-u $sfm"
|
|
||||||
if ! ( unicode_start_stop $vc \
|
|
||||||
&& setfont -C ${DEVICE_PREFIX}$vc ${SETFONT_OPT} $sfm $font )
|
|
||||||
then
|
|
||||||
[ "$VERBOSE" != "no" ] && log_action_end_msg 1
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
[ "$VERBOSE" != "no" ] && log_action_end_msg 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# Per-VC ACMs
|
|
||||||
PERVC_ACMS="`set | grep "^CONSOLE_MAP_vc[0-9]*=" | tr -d \' `"
|
|
||||||
if [ -z "${HAVE_SETUPCON}" -a "${PERVC_ACMS}" ]; then
|
|
||||||
[ "$VERBOSE" != "no" ] && log_action_begin_msg "Setting up per-VC ACM's"
|
|
||||||
for acm in ${PERVC_ACMS}
|
|
||||||
do
|
|
||||||
# extract VC and ACM_FONTNAME info from variable setting
|
|
||||||
vc=`echo $acm | cut -b15- | cut -d= -f1`
|
|
||||||
eval acm=\$CONSOLE_MAP_vc$vc
|
|
||||||
if ! setfont -C "${DEVICE_PREFIX}$vc" ${SETFONT_OPT} -m "$acm"; then
|
|
||||||
[ "$VERBOSE" != "no" ] && log_action_end_msg 1
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
[ "$VERBOSE" != "no" ] && log_action_end_msg 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# screensaver stuff
|
|
||||||
setterm_args=""
|
|
||||||
if [ "$BLANK_TIME" ]; then
|
|
||||||
setterm_args="$setterm_args -blank $BLANK_TIME"
|
|
||||||
fi
|
|
||||||
if [ "$BLANK_DPMS" ]; then
|
|
||||||
setterm_args="$setterm_args -powersave $BLANK_DPMS"
|
|
||||||
fi
|
|
||||||
if [ "$POWERDOWN_TIME" ]; then
|
|
||||||
setterm_args="$setterm_args -powerdown $POWERDOWN_TIME"
|
|
||||||
fi
|
|
||||||
if [ "$setterm_args" ]; then
|
|
||||||
setterm $setterm_args
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Keyboard rate and delay
|
|
||||||
KBDRATE_ARGS=""
|
|
||||||
if [ -n "$KEYBOARD_RATE" ]; then
|
|
||||||
KBDRATE_ARGS="-r $KEYBOARD_RATE"
|
|
||||||
fi
|
|
||||||
if [ -n "$KEYBOARD_DELAY" ]; then
|
|
||||||
KBDRATE_ARGS="$KBDRATE_ARGS -d $KEYBOARD_DELAY"
|
|
||||||
fi
|
|
||||||
if [ -n "$KBDRATE_ARGS" ]; then
|
|
||||||
[ "$VERBOSE" != "no" ] && log_action_begin_msg "Setting keyboard rate and delay"
|
|
||||||
kbdrate -s $KBDRATE_ARGS
|
|
||||||
[ "$VERBOSE" != "no" ] && log_action_end_msg 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Inform gpm if present, of potential changes.
|
|
||||||
if [ -f /var/run/gpm.pid ]; then
|
|
||||||
kill -s WINCH `cat /var/run/gpm.pid` 2> /dev/null
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Allow user to remap keys on the console
|
|
||||||
if [ -z "${HAVE_SETUPCON}" -a -r /etc/$PKG/remap ]; then
|
|
||||||
dumpkeys < ${DEVICE_PREFIX}1 | sed -f /etc/$PKG/remap | loadkeys --quiet
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Set LEDS here
|
|
||||||
if [ -n "$LEDS" ]; then
|
|
||||||
for i in $LIST_CONSOLES
|
|
||||||
do
|
|
||||||
setleds -D $LEDS < $DEVICE_PREFIX$i
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
start|reload|restart|force-reload)
|
|
||||||
if [ -n "$HAVE_SETUPCON" ]
|
|
||||||
then
|
|
||||||
log_action_msg "Setting console screen modes"
|
|
||||||
else
|
|
||||||
log_action_msg "Setting console screen modes and fonts"
|
|
||||||
fi
|
|
||||||
setup
|
|
||||||
[ -z "$HAVE_SETUPCON" ] || log_action_msg "Skipping font and keymap setup (handled by console-setup)"
|
|
||||||
;;
|
|
||||||
stop)
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
setup
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
:
|
|
||||||
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
Prevent nash-hotplug to keep running after boot using 100% of cpu
|
|
||||||
|
|
||||||
diff -rud mkinitrd-6.0.34-orig/nash/hotplug.c mkinitrd-6.0.34/nash/hotplug.c
|
|
||||||
--- mkinitrd-6.0.34-orig/nash/hotplug.c 2008-03-06 21:20:34.000000000 -0300
|
|
||||||
+++ mkinitrd-6.0.34/nash/hotplug.c 2008-03-12 18:48:46.000000000 -0300
|
|
||||||
@@ -547,7 +547,7 @@
|
|
||||||
nashLogger(nc, NASH_ERROR, "parent exited without telling us\n");
|
|
||||||
close(nc->hp_childfd);
|
|
||||||
nc->hp_childfd = -1;
|
|
||||||
- break;
|
|
||||||
+ exit(1);
|
|
||||||
}
|
|
||||||
count += rc;
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
if [ $# -eq 0 ]; then
|
|
||||||
initctl show
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $# -lt 2 -o $# -gt 2 ]; then
|
|
||||||
echo "Usage: service [job# | name] <stop | start | restart | reload>"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
initctl $2 $1
|
|
||||||
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# Alternative boot method for other distributions than Debian 6.0
|
|
||||||
# Place this file in a /etc/start.d/ directory and add the following
|
|
||||||
# line to /etc/finit.conf:
|
|
||||||
#
|
|
||||||
# runparts /etc/start.d
|
|
||||||
#
|
|
||||||
# At boot finit will run all files, using its built-in run_parts(),
|
|
||||||
# in that directory.
|
|
||||||
#
|
|
||||||
# Here we chain load Debian /etc/rcS.d and /etc/rc2.d directories
|
|
||||||
# in sequence using the standard run-parts tool.
|
|
||||||
run-parts /etc/rcS.d --arg=start
|
|
||||||
run-parts /etc/rc2.d --arg=start
|
|
||||||
|
|
||||||
# You can also place other commands in this services file, akin to
|
|
||||||
# the old finit /usr/sbin/services.sh (not supported anymore).
|
|
||||||
#service acpid start
|
|
||||||
#service networking start
|
|
||||||
#service ssh start
|
|
||||||
Reference in new issue
Block a user