Added systemd and dbus to the book.

Set up systemd and System V side-by-side with the
ability to reboot to either system.


git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@10520 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
Bruce Dubbs 2014-04-03 21:52:09 +00:00
parent 008436e04c
commit cba2d4e6aa
48 changed files with 1321 additions and 4112 deletions

View File

@ -5,7 +5,6 @@
<!ENTITY checkfs SYSTEM "checkfs.script"> <!ENTITY checkfs SYSTEM "checkfs.script">
<!ENTITY cleanfs SYSTEM "cleanfs.script"> <!ENTITY cleanfs SYSTEM "cleanfs.script">
<!ENTITY console SYSTEM "console.script"> <!ENTITY console SYSTEM "console.script">
<!ENTITY functions SYSTEM "functions.script">
<!ENTITY halt SYSTEM "halt.script"> <!ENTITY halt SYSTEM "halt.script">
<!ENTITY initfunctions SYSTEM "init-functions.script"> <!ENTITY initfunctions SYSTEM "init-functions.script">
<!ENTITY localnet SYSTEM "localnet.script"> <!ENTITY localnet SYSTEM "localnet.script">
@ -62,11 +61,6 @@
<screen>&initfunctions;</screen> <screen>&initfunctions;</screen>
</sect1> </sect1>
<sect1 id="functions" role="wrap">
<title>/etc/rc.d/init.d/functions</title>
<screen>&functions;</screen>
</sect1>
<sect1 id="mountvirtfs" role="wrap"> <sect1 id="mountvirtfs" role="wrap">
<title>/etc/rc.d/init.d/mountvirtfs</title> <title>/etc/rc.d/init.d/mountvirtfs</title>
<screen>&mountvirtfs;</screen> <screen>&mountvirtfs;</screen>

View File

@ -14,7 +14,7 @@
<para>The rules from <!-- &eudev-lfs;.tar.bz2 -->in this appendix are listed for <para>The rules from <!-- &eudev-lfs;.tar.bz2 -->in this appendix are listed for
convenience. Installation is normally done via instructions in <xref convenience. Installation is normally done via instructions in <xref
linkend='ch-system-eudev'/>. </para> linkend='ch-system-systemd'/>. </para>
<sect1 id="lfsrules" role="wrap"> <sect1 id="lfsrules" role="wrap">
<title>55-lfs.rules</title> <title>55-lfs.rules</title>

View File

@ -1,3 +1,6 @@
2014-03-31 Bruce Dubbs <bdubbs@linuxfromscratch.org>
* Changes made to be consistent with common systemd functions
2013-08-21 Bruce Dubbs <bdubbs@linuxfromscratch.org> 2013-08-21 Bruce Dubbs <bdubbs@linuxfromscratch.org>
* Delete duplicate entry in rc.site file. * Delete duplicate entry in rc.site file.

View File

@ -1,5 +1,7 @@
EXTDIR=${DESTDIR}/etc ETCDIR=${DESTDIR}/etc
LIBDIR=${DESTDIR}/lib/services LIBDIR=${DESTDIR}/lib
SERVICEDIR=${LIBDIR}/services
UNITDIR=${LIBDIR}/systemd/system
MAN8=${DESTDIR}/usr/share/man/man8 MAN8=${DESTDIR}/usr/share/man/man8
SBIN=${DESTDIR}/sbin SBIN=${DESTDIR}/sbin
MODE=754 MODE=754
@ -11,120 +13,124 @@ all: links
install: all install: all
create-dirs: create-dirs:
install -d -m ${DIRMODE} ${EXTDIR}/rc.d/rc0.d install -d -m ${DIRMODE} ${ETCDIR}/rc.d/rc0.d
install -d -m ${DIRMODE} ${EXTDIR}/rc.d/rc1.d install -d -m ${DIRMODE} ${ETCDIR}/rc.d/rc1.d
install -d -m ${DIRMODE} ${EXTDIR}/rc.d/rc2.d install -d -m ${DIRMODE} ${ETCDIR}/rc.d/rc2.d
install -d -m ${DIRMODE} ${EXTDIR}/rc.d/rc3.d install -d -m ${DIRMODE} ${ETCDIR}/rc.d/rc3.d
install -d -m ${DIRMODE} ${EXTDIR}/rc.d/rc4.d install -d -m ${DIRMODE} ${ETCDIR}/rc.d/rc4.d
install -d -m ${DIRMODE} ${EXTDIR}/rc.d/rc5.d install -d -m ${DIRMODE} ${ETCDIR}/rc.d/rc5.d
install -d -m ${DIRMODE} ${EXTDIR}/rc.d/rc6.d install -d -m ${DIRMODE} ${ETCDIR}/rc.d/rc6.d
install -d -m ${DIRMODE} ${EXTDIR}/rc.d/rcS.d install -d -m ${DIRMODE} ${ETCDIR}/rc.d/rcS.d
install -d -m ${DIRMODE} ${EXTDIR}/rc.d/init.d install -d -m ${DIRMODE} ${ETCDIR}/rc.d/init.d
install -d -m ${DIRMODE} ${EXTDIR}/sysconfig install -d -m ${DIRMODE} ${ETCDIR}/sysconfig
install -d -m ${DIRMODE} ${LIBDIR} install -d -m ${DIRMODE} ${LIBDIR}
install -d -m ${DIRMODE} ${SERVICEDIR}
install -d -m ${DIRMODE} ${UNITDIR}
install -d -m ${DIRMODE} ${MAN8} install -d -m ${DIRMODE} ${MAN8}
install -d -m ${DIRMODE} ${SBIN} install -d -m ${DIRMODE} ${SBIN}
ln -sfn services ${DESTDIR}/lib/lsb ln -sfn services ${LIBDIR}/lsb
ln -sfn rc.d/init.d ${EXTDIR}/init.d ln -sfn rc.d/init.d ${ETCDIR}/init.d-sysv
ln -sfn init.d-sysv ${ETCDIR}/init.d
files: create-dirs files: create-dirs
install -m ${MODE} lfs/init.d/checkfs ${EXTDIR}/rc.d/init.d/ install -m ${MODE} lfs/init.d/checkfs ${ETCDIR}/rc.d/init.d/
install -m ${MODE} lfs/init.d/cleanfs ${EXTDIR}/rc.d/init.d/ install -m ${MODE} lfs/init.d/cleanfs ${ETCDIR}/rc.d/init.d/
install -m ${MODE} lfs/init.d/halt ${EXTDIR}/rc.d/init.d/ install -m ${MODE} lfs/init.d/halt ${ETCDIR}/rc.d/init.d/
install -m ${MODE} lfs/init.d/console ${EXTDIR}/rc.d/init.d/ install -m ${MODE} lfs/init.d/console ${ETCDIR}/rc.d/init.d/
install -m ${CONFMODE} lfs/init.d/functions ${EXTDIR}/rc.d/init.d/ install -m ${MODE} lfs/init.d/localnet ${ETCDIR}/rc.d/init.d/
install -m ${MODE} lfs/init.d/localnet ${EXTDIR}/rc.d/init.d/ install -m ${MODE} lfs/init.d/modules ${ETCDIR}/rc.d/init.d/
install -m ${MODE} lfs/init.d/modules ${EXTDIR}/rc.d/init.d/ install -m ${MODE} lfs/init.d/mountfs ${ETCDIR}/rc.d/init.d/
install -m ${MODE} lfs/init.d/mountfs ${EXTDIR}/rc.d/init.d/ install -m ${MODE} lfs/init.d/mountvirtfs ${ETCDIR}/rc.d/init.d/
install -m ${MODE} lfs/init.d/mountvirtfs ${EXTDIR}/rc.d/init.d/ install -m ${MODE} lfs/init.d/network ${ETCDIR}/rc.d/init.d/
install -m ${MODE} lfs/init.d/network ${EXTDIR}/rc.d/init.d/ install -m ${MODE} lfs/init.d/rc ${ETCDIR}/rc.d/init.d/
install -m ${MODE} lfs/init.d/rc ${EXTDIR}/rc.d/init.d/ install -m ${MODE} lfs/init.d/reboot ${ETCDIR}/rc.d/init.d/
install -m ${MODE} lfs/init.d/reboot ${EXTDIR}/rc.d/init.d/ install -m ${MODE} lfs/init.d/sendsignals ${ETCDIR}/rc.d/init.d/
install -m ${MODE} lfs/init.d/sendsignals ${EXTDIR}/rc.d/init.d/ install -m ${MODE} lfs/init.d/setclock ${ETCDIR}/rc.d/init.d/
install -m ${MODE} lfs/init.d/setclock ${EXTDIR}/rc.d/init.d/ install -m ${MODE} lfs/init.d/swap ${ETCDIR}/rc.d/init.d/
install -m ${MODE} lfs/init.d/swap ${EXTDIR}/rc.d/init.d/ install -m ${MODE} lfs/init.d/sysctl ${ETCDIR}/rc.d/init.d/
install -m ${MODE} lfs/init.d/sysctl ${EXTDIR}/rc.d/init.d/ install -m ${MODE} lfs/init.d/sysklogd ${ETCDIR}/rc.d/init.d/
install -m ${MODE} lfs/init.d/sysklogd ${EXTDIR}/rc.d/init.d/ install -m ${MODE} lfs/init.d/template ${ETCDIR}/rc.d/init.d/
install -m ${MODE} lfs/init.d/template ${EXTDIR}/rc.d/init.d/ install -m ${MODE} lfs/init.d/udev ${ETCDIR}/rc.d/init.d/
install -m ${MODE} lfs/init.d/udev ${EXTDIR}/rc.d/init.d/ install -m ${MODE} lfs/init.d/udev_retry ${ETCDIR}/rc.d/init.d/
install -m ${MODE} lfs/init.d/udev_retry ${EXTDIR}/rc.d/init.d/
install -m ${MODE} lfs/sbin/ifup ${SBIN} install -m ${MODE} lfs/sbin/ifup ${SBIN}
install -m ${MODE} lfs/sbin/ifdown ${SBIN} install -m ${MODE} lfs/sbin/ifdown ${SBIN}
install -m ${MODE} lfs/sbin/ifup.8 ${MAN8} install -m ${CONFMODE} lfs/sbin/ifup.8 ${MAN8}
ln -sf ifup.8 ${MAN8}/ifdown.8 ln -sf ifup.8 ${MAN8}/ifdown.8
install -m ${MODE} lfs/lib/services/ipv4-static-route ${LIBDIR} install -m ${MODE} lfs/lib/services/ipv4-static-route ${SERVICEDIR}
install -m ${MODE} lfs/lib/services/ipv4-static ${LIBDIR} install -m ${MODE} lfs/lib/services/ipv4-static ${SERVICEDIR}
install -m ${CONFMODE} lfs/lib/services/init-functions ${LIBDIR} install -m ${CONFMODE} lfs/lib/services/init-functions ${SERVICEDIR}
if [ ! -f ${EXTDIR}/sysconfig/createfiles ]; then \ install -m ${CONFMODE} lfs/units/ifupdownat.service ${UNITDIR}/ifupdown@.service
install -m ${CONFMODE} lfs/sysconfig/createfiles ${EXTDIR}/sysconfig/ ;\
if [ ! -f ${ETCDIR}/sysconfig/createfiles ]; then \
install -m ${CONFMODE} lfs/sysconfig/createfiles ${ETCDIR}/sysconfig/ ;\
fi fi
if [ ! -f ${EXTDIR}/sysconfig/modules ]; then \ if [ ! -f ${ETCDIR}/sysconfig/modules ]; then \
install -m ${CONFMODE} lfs/sysconfig/modules ${EXTDIR}/sysconfig/ ;\ install -m ${CONFMODE} lfs/sysconfig/modules ${ETCDIR}/sysconfig/ ;\
fi fi
if [ ! -f ${EXTDIR}/sysconfig/udev_retry ]; then \ if [ ! -f ${ETCDIR}/sysconfig/udev_retry ]; then \
install -m ${CONFMODE} lfs/sysconfig/udev_retry ${EXTDIR}/sysconfig/ ;\ install -m ${CONFMODE} lfs/sysconfig/udev_retry ${ETCDIR}/sysconfig/ ;\
fi fi
if [ ! -f ${EXTDIR}/sysconfig/rc.site ]; then \ if [ ! -f ${ETCDIR}/sysconfig/rc.site ]; then \
install -m ${CONFMODE} lfs/sysconfig/rc.site ${EXTDIR}/sysconfig/ ;\ install -m ${CONFMODE} lfs/sysconfig/rc.site ${ETCDIR}/sysconfig/ ;\
fi fi
links: rcS rc0 rc1 rc2 rc3 rc4 rc5 rc6 links: rcS rc0 rc1 rc2 rc3 rc4 rc5 rc6
rcS: files rcS: files
ln -sf ../init.d/mountvirtfs ${EXTDIR}/rc.d/rcS.d/S00mountvirtfs ln -sf ../init.d/mountvirtfs ${ETCDIR}/rc.d/rcS.d/S00mountvirtfs
ln -sf ../init.d/modules ${EXTDIR}/rc.d/rcS.d/S05modules ln -sf ../init.d/modules ${ETCDIR}/rc.d/rcS.d/S05modules
ln -sf ../init.d/localnet ${EXTDIR}/rc.d/rcS.d/S08localnet ln -sf ../init.d/localnet ${ETCDIR}/rc.d/rcS.d/S08localnet
ln -sf ../init.d/udev ${EXTDIR}/rc.d/rcS.d/S10udev ln -sf ../init.d/udev ${ETCDIR}/rc.d/rcS.d/S10udev
ln -sf ../init.d/swap ${EXTDIR}/rc.d/rcS.d/S20swap ln -sf ../init.d/swap ${ETCDIR}/rc.d/rcS.d/S20swap
ln -sf ../init.d/checkfs ${EXTDIR}/rc.d/rcS.d/S30checkfs ln -sf ../init.d/checkfs ${ETCDIR}/rc.d/rcS.d/S30checkfs
ln -sf ../init.d/mountfs ${EXTDIR}/rc.d/rcS.d/S40mountfs ln -sf ../init.d/mountfs ${ETCDIR}/rc.d/rcS.d/S40mountfs
ln -sf ../init.d/cleanfs ${EXTDIR}/rc.d/rcS.d/S45cleanfs ln -sf ../init.d/cleanfs ${ETCDIR}/rc.d/rcS.d/S45cleanfs
ln -sf ../init.d/udev_retry ${EXTDIR}/rc.d/rcS.d/S50udev_retry ln -sf ../init.d/udev_retry ${ETCDIR}/rc.d/rcS.d/S50udev_retry
ln -sf ../init.d/console ${EXTDIR}/rc.d/rcS.d/S70console ln -sf ../init.d/console ${ETCDIR}/rc.d/rcS.d/S70console
ln -sf ../init.d/sysctl ${EXTDIR}/rc.d/rcS.d/S90sysctl ln -sf ../init.d/sysctl ${ETCDIR}/rc.d/rcS.d/S90sysctl
rc0: files rc0: files
ln -sf ../init.d/network ${EXTDIR}/rc.d/rc0.d/K80network ln -sf ../init.d/network ${ETCDIR}/rc.d/rc0.d/K80network
ln -sf ../init.d/sysklogd ${EXTDIR}/rc.d/rc0.d/K90sysklogd ln -sf ../init.d/sysklogd ${ETCDIR}/rc.d/rc0.d/K90sysklogd
ln -sf ../init.d/sendsignals ${EXTDIR}/rc.d/rc0.d/S60sendsignals ln -sf ../init.d/sendsignals ${ETCDIR}/rc.d/rc0.d/S60sendsignals
ln -sf ../init.d/swap ${EXTDIR}/rc.d/rc0.d/S65swap ln -sf ../init.d/swap ${ETCDIR}/rc.d/rc0.d/S65swap
ln -sf ../init.d/mountfs ${EXTDIR}/rc.d/rc0.d/S70mountfs ln -sf ../init.d/mountfs ${ETCDIR}/rc.d/rc0.d/S70mountfs
ln -sf ../init.d/localnet ${EXTDIR}/rc.d/rc0.d/S90localnet ln -sf ../init.d/localnet ${ETCDIR}/rc.d/rc0.d/S90localnet
ln -sf ../init.d/halt ${EXTDIR}/rc.d/rc0.d/S99halt ln -sf ../init.d/halt ${ETCDIR}/rc.d/rc0.d/S99halt
rc1: files rc1: files
ln -sf ../init.d/network ${EXTDIR}/rc.d/rc1.d/K80network ln -sf ../init.d/network ${ETCDIR}/rc.d/rc1.d/K80network
ln -sf ../init.d/sysklogd ${EXTDIR}/rc.d/rc1.d/K90sysklogd ln -sf ../init.d/sysklogd ${ETCDIR}/rc.d/rc1.d/K90sysklogd
rc2: files rc2: files
ln -sf ../init.d/network ${EXTDIR}/rc.d/rc2.d/K80network ln -sf ../init.d/network ${ETCDIR}/rc.d/rc2.d/K80network
ln -sf ../init.d/sysklogd ${EXTDIR}/rc.d/rc2.d/K90sysklogd ln -sf ../init.d/sysklogd ${ETCDIR}/rc.d/rc2.d/K90sysklogd
rc3: files rc3: files
ln -sf ../init.d/sysklogd ${EXTDIR}/rc.d/rc3.d/S10sysklogd ln -sf ../init.d/sysklogd ${ETCDIR}/rc.d/rc3.d/S10sysklogd
ln -sf ../init.d/network ${EXTDIR}/rc.d/rc3.d/S20network ln -sf ../init.d/network ${ETCDIR}/rc.d/rc3.d/S20network
rc4: files rc4: files
ln -sf ../init.d/sysklogd ${EXTDIR}/rc.d/rc4.d/S10sysklogd ln -sf ../init.d/sysklogd ${ETCDIR}/rc.d/rc4.d/S10sysklogd
ln -sf ../init.d/network ${EXTDIR}/rc.d/rc4.d/S20network ln -sf ../init.d/network ${ETCDIR}/rc.d/rc4.d/S20network
rc5: files rc5: files
ln -sf ../init.d/sysklogd ${EXTDIR}/rc.d/rc5.d/S10sysklogd ln -sf ../init.d/sysklogd ${ETCDIR}/rc.d/rc5.d/S10sysklogd
ln -sf ../init.d/network ${EXTDIR}/rc.d/rc5.d/S20network ln -sf ../init.d/network ${ETCDIR}/rc.d/rc5.d/S20network
rc6: files rc6: files
ln -sf ../init.d/network ${EXTDIR}/rc.d/rc6.d/K80network ln -sf ../init.d/network ${ETCDIR}/rc.d/rc6.d/K80network
ln -sf ../init.d/sysklogd ${EXTDIR}/rc.d/rc6.d/K90sysklogd ln -sf ../init.d/sysklogd ${ETCDIR}/rc.d/rc6.d/K90sysklogd
ln -sf ../init.d/sendsignals ${EXTDIR}/rc.d/rc6.d/S60sendsignals ln -sf ../init.d/sendsignals ${ETCDIR}/rc.d/rc6.d/S60sendsignals
ln -sf ../init.d/swap ${EXTDIR}/rc.d/rc6.d/S65swap ln -sf ../init.d/swap ${ETCDIR}/rc.d/rc6.d/S65swap
ln -sf ../init.d/mountfs ${EXTDIR}/rc.d/rc6.d/S70mountfs ln -sf ../init.d/mountfs ${ETCDIR}/rc.d/rc6.d/S70mountfs
ln -sf ../init.d/localnet ${EXTDIR}/rc.d/rc6.d/S90localnet ln -sf ../init.d/localnet ${ETCDIR}/rc.d/rc6.d/S90localnet
ln -sf ../init.d/reboot ${EXTDIR}/rc.d/rc6.d/S99reboot ln -sf ../init.d/reboot ${ETCDIR}/rc.d/rc6.d/S99reboot
uninstall: uninstall:
rm -rf ${DESTDIR}/lib/services ${DESTDIR}/lib/lsb ${EXTDIR}/rc.d ${EXTDIR}/init.d \ rm -rf ${DESTDIR}/lib/services ${DESTDIR}/lib/lsb ${ETCDIR}/rc.d ${ETCDIR}/init.d \
${SBIN}/ifup ${SBIN}/ifdown ${MAN8}/ifup.8 ${MAN8}/ifdown.8 \ ${SBIN}/ifup ${SBIN}/ifdown ${MAN8}/ifup.8 ${MAN8}/ifdown.8 \
${EXTDIR}/sysconfig/rc ${ETCDIR}/sysconfig/rc
.PHONY: all create-dirs install files links rcS rc0 rc1 rc2 rc3 rc4 rc5 rc6 uninstall .PHONY: all create-dirs install files links rcS rc0 rc1 rc2 rc3 rc4 rc5 rc6 uninstall

View File

@ -1,793 +0,0 @@
#!/bin/sh
########################################################################
# Begin boot functions
#
# Description : Run Level Control Functions
#
# Authors : Gerard Beekmans - gerard@linuxfromscratch.org
# Update : Bruce Dubbs - bdubbs@linuxfromscratch.org
#
# Version : LFS 7.0
#
# Notes : With code based on Matthias Benkmann's simpleinit-msb
# http://winterdrache.de/linux/newboot/index.html
#
# This file is only present for backward BLFS compatibility
#
########################################################################
## Environmental setup
# Setup default values for environment
umask 022
export PATH="/bin:/usr/bin:/sbin:/usr/sbin"
# Signal sent to running processes to refresh their configuration
RELOADSIG="HUP"
# Number of seconds between STOPSIG and FALLBACK when stopping processes
KILLDELAY="3"
## Screen Dimensions
# Find current screen size
if [ -z "${COLUMNS}" ]; then
COLUMNS=$(stty size)
COLUMNS=${COLUMNS##* }
fi
# When using remote connections, such as a serial port, stty size returns 0
if [ "${COLUMNS}" = "0" ]; then
COLUMNS=80
fi
## Measurements for positioning result messages
COL=$((${COLUMNS} - 8))
WCOL=$((${COL} - 2))
## Provide an echo that supports -e and -n
# If formatting is needed, $ECHO should be used
case "`echo -e -n test`" in
-[en]*)
ECHO=/bin/echo
;;
*)
ECHO=echo
;;
esac
## Set Cursor Position Commands, used via $ECHO
SET_COL="\\033[${COL}G" # at the $COL char
SET_WCOL="\\033[${WCOL}G" # at the $WCOL char
CURS_UP="\\033[1A\\033[0G" # Up one line, at the 0'th char
## Set color commands, used via $ECHO
# Please consult `man console_codes for more information
# under the "ECMA-48 Set Graphics Rendition" section
#
# Warning: when switching from a 8bit to a 9bit font,
# the linux console will reinterpret the bold (1;) to
# the top 256 glyphs of the 9bit font. This does
# not affect framebuffer consoles
NORMAL="\\033[0;39m" # Standard console grey
SUCCESS="\\033[1;32m" # Success is green
WARNING="\\033[1;33m" # Warnings are yellow
FAILURE="\\033[1;31m" # Failures are red
INFO="\\033[1;36m" # Information is light cyan
BRACKET="\\033[1;34m" # Brackets are blue
STRING_LENGTH="0" # the length of the current message
#*******************************************************************************
# Function - boot_mesg()
#
# Purpose: Sending information from bootup scripts to the console
#
# Inputs: $1 is the message
# $2 is the colorcode for the console
#
# Outputs: Standard Output
#
# Dependencies: - sed for parsing strings.
# - grep for counting string length.
#
# Todo:
#*******************************************************************************
boot_mesg()
{
local ECHOPARM=""
while true
do
case "${1}" in
-n)
ECHOPARM=" -n "
shift 1
;;
-*)
echo "Unknown Option: ${1}"
return 1
;;
*)
break
;;
esac
done
## Figure out the length of what is to be printed to be used
## for warning messages.
STRING_LENGTH=$((${#1} + 1))
# Print the message to the screen
${ECHO} ${ECHOPARM} -e "${2}${1}"
# Log the message
[ -d /run/var ] || return
${ECHO} ${ECHOPARM} -e "${2}${1}" >> /run/var/bootlog
}
boot_mesg_flush()
{
# Reset STRING_LENGTH for next message
STRING_LENGTH="0"
}
echo_ok()
{
${ECHO} -n -e "${CURS_UP}${SET_COL}${BRACKET}[${SUCCESS} OK ${BRACKET}]"
${ECHO} -e "${NORMAL}"
boot_mesg_flush
[ -d /run/var ] || return
${ECHO} -e "[ OK ]" >> /run/var/bootlog
}
echo_failure()
{
${ECHO} -n -e "${CURS_UP}${SET_COL}${BRACKET}[${FAILURE} FAIL ${BRACKET}]"
${ECHO} -e "${NORMAL}"
boot_mesg_flush
[ -d /run/var ] || return
${ECHO} -e "[ FAIL]" >> /run/var/bootlog
}
echo_warning()
{
${ECHO} -n -e "${CURS_UP}${SET_COL}${BRACKET}[${WARNING} WARN ${BRACKET}]"
${ECHO} -e "${NORMAL}"
boot_mesg_flush
[ -d /run/var ] || return
${ECHO} -e "[ WARN ]" >> /run/var/bootlog
}
echo_skipped()
{
${ECHO} -n -e "${CURS_UP}${SET_COL}${BRACKET}[${WARNING} SKIP ${BRACKET}]"
${ECHO} -e "${NORMAL}"
boot_mesg_flush
[ -d /run/var ] || return
${ECHO} -e " [ SKIP ]" >> /run/var/bootlog
}
wait_for_user()
{
# Wait for the user by default
[ "${HEADLESS=0}" = "0" ] && read ENTER
}
evaluate_retval()
{
error_value="${?}"
if [ ${error_value} = 0 ]; then
echo_ok
else
echo_failure
fi
# This prevents the 'An Unexpected Error Has Occurred' from trivial
# errors.
return 0
}
print_status()
{
if [ "${#}" = "0" ]; then
echo "Usage: ${0} {success|warning|failure}"
return 1
fi
case "${1}" in
success)
echo_ok
;;
warning)
# Leave this extra case in because old scripts
# may call it this way.
case "${2}" in
running)
${ECHO} -e -n "${CURS_UP}"
${ECHO} -e -n "\\033[${STRING_LENGTH}G "
boot_mesg "Already running." ${WARNING}
echo_warning
;;
not_running)
${ECHO} -e -n "${CURS_UP}"
${ECHO} -e -n "\\033[${STRING_LENGTH}G "
boot_mesg "Not running." ${WARNING}
echo_warning
;;
not_available)
${ECHO} -e -n "${CURS_UP}"
${ECHO} -e -n "\\033[${STRING_LENGTH}G "
boot_mesg "Not available." ${WARNING}
echo_warning
;;
*)
# This is how it is supposed to
# be called
echo_warning
;;
esac
;;
failure)
echo_failure
;;
esac
}
reloadproc()
{
local pidfile=""
local failure=0
while true
do
case "${1}" in
-p)
pidfile="${2}"
shift 2
;;
-*)
log_failure_msg "Unknown Option: ${1}"
return 2
;;
*)
break
;;
esac
done
if [ "${#}" -lt "1" ]; then
log_failure_msg "Usage: reloadproc [-p pidfile] pathname"
return 2
fi
# This will ensure compatibility with previous LFS Bootscripts
if [ -n "${PIDFILE}" ]; then
pidfile="${PIDFILE}"
fi
# Is the process running?
if [ -z "${pidfile}" ]; then
pidofproc -s "${1}"
else
pidofproc -s -p "${pidfile}" "${1}"
fi
# Warn about stale pid file
if [ "$?" = 1 ]; then
boot_mesg -n "Removing stale pid file: ${pidfile}. " ${WARNING}
rm -f "${pidfile}"
fi
if [ -n "${pidlist}" ]; then
for pid in ${pidlist}
do
kill -"${RELOADSIG}" "${pid}" || failure="1"
done
(exit ${failure})
evaluate_retval
else
boot_mesg "Process ${1} not running." ${WARNING}
echo_warning
fi
}
statusproc()
{
local pidfile=""
local base=""
local ret=""
while true
do
case "${1}" in
-p)
pidfile="${2}"
shift 2
;;
-*)
log_failure_msg "Unknown Option: ${1}"
return 2
;;
*)
break
;;
esac
done
if [ "${#}" != "1" ]; then
shift 1
log_failure_msg "Usage: statusproc [-p pidfile] pathname"
return 2
fi
# Get the process basename
base="${1##*/}"
# This will ensure compatibility with previous LFS Bootscripts
if [ -n "${PIDFILE}" ]; then
pidfile="${PIDFILE}"
fi
# Is the process running?
if [ -z "${pidfile}" ]; then
pidofproc -s "${1}"
else
pidofproc -s -p "${pidfile}" "${1}"
fi
# Store the return status
ret=$?
if [ -n "${pidlist}" ]; then
${ECHO} -e "${INFO}${base} is running with Process"\
"ID(s) ${pidlist}.${NORMAL}"
else
if [ -n "${base}" -a -e "/var/run/${base}.pid" ]; then
${ECHO} -e "${WARNING}${1} is not running but"\
"/var/run/${base}.pid exists.${NORMAL}"
else
if [ -n "${pidfile}" -a -e "${pidfile}" ]; then
${ECHO} -e "${WARNING}${1} is not running"\
"but ${pidfile} exists.${NORMAL}"
else
${ECHO} -e "${INFO}${1} is not running.${NORMAL}"
fi
fi
fi
# Return the status from pidofproc
return $ret
}
# The below functions are documented in the LSB-generic 2.1.0
#*******************************************************************************
# Function - pidofproc [-s] [-p pidfile] pathname
#
# Purpose: This function returns one or more pid(s) for a particular daemon
#
# Inputs: -p pidfile, use the specified pidfile instead of pidof
# pathname, path to the specified program
#
# Outputs: return 0 - Success, pid's in stdout
# return 1 - Program is dead, pidfile exists
# return 2 - Invalid or excessive number of arguments,
# warning in stdout
# return 3 - Program is not running
#
# Dependencies: pidof, echo, head
#
# Todo: Remove dependency on head
# This replaces getpids
# Test changes to pidof
#
#*******************************************************************************
pidofproc()
{
local pidfile=""
local lpids=""
local silent=""
pidlist=""
while true
do
case "${1}" in
-p)
pidfile="${2}"
shift 2
;;
-s)
# Added for legacy opperation of getpids
# eliminates several '> /dev/null'
silent="1"
shift 1
;;
-*)
log_failure_msg "Unknown Option: ${1}"
return 2
;;
*)
break
;;
esac
done
if [ "${#}" != "1" ]; then
shift 1
log_failure_msg "Usage: pidofproc [-s] [-p pidfile] pathname"
return 2
fi
if [ -n "${pidfile}" ]; then
if [ ! -r "${pidfile}" ]; then
return 3 # Program is not running
fi
lpids=`head -n 1 ${pidfile}`
for pid in ${lpids}
do
if [ "${pid}" -ne "$$" -a "${pid}" -ne "${PPID}" ]; then
kill -0 "${pid}" 2>/dev/null &&
pidlist="${pidlist} ${pid}"
fi
if [ "${silent}" != "1" ]; then
echo "${pidlist}"
fi
test -z "${pidlist}" &&
# Program is dead, pidfile exists
return 1
# else
return 0
done
else
pidlist=`pidof -o $$ -o $PPID -x "$1"`
if [ "${silent}" != "1" ]; then
echo "${pidlist}"
fi
# Get provide correct running status
if [ -n "${pidlist}" ]; then
return 0
else
return 3
fi
fi
if [ "$?" != "0" ]; then
return 3 # Program is not running
fi
}
#*******************************************************************************
# Function - loadproc [-f] [-n nicelevel] [-p pidfile] pathname [args]
#
# Purpose: This runs the specified program as a daemon
#
# Inputs: -f, run the program even if it is already running
# -n nicelevel, specifies a nice level. See nice(1).
# -p pidfile, uses the specified pidfile
# pathname, pathname to the specified program
# args, arguments to pass to specified program
#
# Outputs: return 0 - Success
# return 2 - Invalid of excessive number of arguments,
# warning in stdout
# return 4 - Program or service status is unknown
#
# Dependencies: nice, rm
#
# Todo: LSB says this should be called start_daemon
# LSB does not say that it should call evaluate_retval
# It checks for PIDFILE, which is deprecated.
# Will be removed after BLFS 6.0
# loadproc returns 0 if program is already running, not LSB compliant
#
#*******************************************************************************
loadproc()
{
local pidfile=""
local forcestart=""
local nicelevel="10"
# This will ensure compatibility with previous LFS Bootscripts
if [ -n "${PIDFILE}" ]; then
pidfile="${PIDFILE}"
fi
while true
do
case "${1}" in
-f)
forcestart="1"
shift 1
;;
-n)
nicelevel="${2}"
shift 2
;;
-p)
pidfile="${2}"
shift 2
;;
-*)
log_failure_msg "Unknown Option: ${1}"
return 2 #invalid or excess argument(s)
;;
*)
break
;;
esac
done
if [ "${#}" = "0" ]; then
log_failure_msg "Usage: loadproc [-f] [-n nicelevel] [-p pidfile] pathname [args]"
return 2 #invalid or excess argument(s)
fi
if [ -z "${forcestart}" ]; then
if [ -z "${pidfile}" ]; then
pidofproc -s "${1}"
else
pidofproc -s -p "${pidfile}" "${1}"
fi
case "${?}" in
0)
log_warning_msg "Unable to continue: ${1} is running"
return 0 # 4
;;
1)
boot_mesg "Removing stale pid file: ${pidfile}" ${WARNING}
rm -f "${pidfile}"
;;
3)
;;
*)
log_failure_msg "Unknown error code from pidofproc: ${?}"
return 4
;;
esac
fi
nice -n "${nicelevel}" "${@}"
evaluate_retval # This is "Probably" not LSB compliant,
# but required to be compatible with older bootscripts
return 0
}
#*******************************************************************************
# Function - killproc [-p pidfile] pathname [signal]
#
# Purpose:
#
# Inputs: -p pidfile, uses the specified pidfile
# pathname, pathname to the specified program
# signal, send this signal to pathname
#
# Outputs: return 0 - Success
# return 2 - Invalid of excessive number of arguments,
# warning in stdout
# return 4 - Unknown Status
#
# Dependencies: kill, rm
#
# Todo: LSB does not say that it should call evaluate_retval
# It checks for PIDFILE, which is deprecated.
# Will be removed after BLFS 6.0
#
#*******************************************************************************
killproc()
{
local pidfile=""
local killsig=TERM # default signal is SIGTERM
pidlist=""
# This will ensure compatibility with previous LFS Bootscripts
if [ -n "${PIDFILE}" ]; then
pidfile="${PIDFILE}"
fi
while true
do
case "${1}" in
-p)
pidfile="${2}"
shift 2
;;
-*)
log_failure_msg "Unknown Option: ${1}"
return 2
;;
*)
break
;;
esac
done
if [ "${#}" = "2" ]; then
killsig="${2}"
elif [ "${#}" != "1" ]; then
shift 2
log_failure_msg "Usage: killproc [-p pidfile] pathname [signal]"
return 2
fi
# Is the process running?
if [ -z "${pidfile}" ]; then
pidofproc -s "${1}"
else
pidofproc -s -p "${pidfile}" "${1}"
fi
# Remove stale pidfile
if [ "$?" = 1 ]; then
boot_mesg "Removing stale pid file: ${pidfile}." ${WARNING}
rm -f "${pidfile}"
fi
# If running, send the signal
if [ -n "${pidlist}" ]; then
for pid in ${pidlist}
do
kill -${killsig} ${pid} 2>/dev/null
# Wait up to 3 seconds, for ${pid} to terminate
case "${killsig}" in
TERM|SIGTERM|KILL|SIGKILL)
# sleep in 1/10ths of seconds and
# multiply KILLDELAY by 10
local dtime="${KILLDELAY}0"
while [ "${dtime}" != "0" ]
do
kill -0 ${pid} 2>/dev/null || break
sleep 0.1
dtime=$(( ${dtime} - 1))
done
# If ${pid} is still running, kill it
kill -0 ${pid} 2>/dev/null && kill -KILL ${pid} 2>/dev/null
;;
esac
done
# Check if the process is still running if we tried to stop it
case "${killsig}" in
TERM|SIGTERM|KILL|SIGKILL)
if [ -z "${pidfile}" ]; then
pidofproc -s "${1}"
else
pidofproc -s -p "${pidfile}" "${1}"
fi
# Program was terminated
if [ "$?" != "0" ]; then
# Remove the pidfile if necessary
if [ -f "${pidfile}" ]; then
rm -f "${pidfile}"
fi
echo_ok
return 0
else # Program is still running
echo_failure
return 4 # Unknown Status
fi
;;
*)
# Just see if the kill returned successfully
evaluate_retval
;;
esac
else # process not running
print_status warning not_running
fi
}
#*******************************************************************************
# Function - log_success_msg "message"
#
# Purpose: Print a success message
#
# Inputs: $@ - Message
#
# Outputs: Text output to screen
#
# Dependencies: echo
#
# Todo: logging
#
#*******************************************************************************
log_success_msg()
{
${ECHO} -n -e "${BOOTMESG_PREFIX}${@}"
${ECHO} -e "${SET_COL}""${BRACKET}""[""${SUCCESS}"" OK ""${BRACKET}""]""${NORMAL}"
[ -d /run/var ] || return 0
${ECHO} -n -e "${@} [ OK ]" >> /run/var/bootlog
return 0
}
#*******************************************************************************
# Function - log_failure_msg "message"
#
# Purpose: Print a failure message
#
# Inputs: $@ - Message
#
# Outputs: Text output to screen
#
# Dependencies: echo
#
# Todo: logging
#
#*******************************************************************************
log_failure_msg() {
${ECHO} -n -e "${BOOTMESG_PREFIX}${@}"
${ECHO} -e "${SET_COL}""${BRACKET}""[""${FAILURE}"" FAIL ""${BRACKET}""]""${NORMAL}"
[ -d /run/var ] || return 0
${ECHO} -e "${@} [ FAIL ]" >> /run/var/bootlog
return 0
}
#*******************************************************************************
# Function - log_warning_msg "message"
#
# Purpose: print a warning message
#
# Inputs: $@ - Message
#
# Outputs: Text output to screen
#
# Dependencies: echo
#
# Todo: logging
#
#*******************************************************************************
log_warning_msg() {
${ECHO} -n -e "${BOOTMESG_PREFIX}${@}"
${ECHO} -e "${SET_COL}""${BRACKET}""[""${WARNING}"" WARN ""${BRACKET}""]""${NORMAL}"
[ -d /run/var ] || return 0
${ECHO} -e "${@} [ WARN ]" >> /run/var/bootlog
return 0
}
#*******************************************************************************
# Function - log_skipped_msg "message"
#
# Purpose: print a message that the script was skipped
#
# Inputs: $@ - Message
#
# Outputs: Text output to screen
#
# Dependencies: echo
#
# Todo: logging
#
#*******************************************************************************
log_skipped_msg() {
${ECHO} -n -e "${BOOTMESG_PREFIX}${@}"
${ECHO} -e "${SET_COL}""${BRACKET}""[""${WARNING}"" SKIP ""${BRACKET}""]""${NORMAL}"
[ -d /run/var ] || return 0
${ECHO} -e "${@} [ SKIP ]" >> /run/var/bootlog
return 0
}
# End boot functions

View File

@ -28,6 +28,7 @@
. /lib/lsb/init-functions . /lib/lsb/init-functions
[ -r /etc/sysconfig/network ] && . /etc/sysconfig/network [ -r /etc/sysconfig/network ] && . /etc/sysconfig/network
[ -r /etc/hostname ] && HOSTNAME=`cat /etc/hostname`
case "${1}" in case "${1}" in
start) start)

View File

@ -39,6 +39,9 @@ case "${1}" in
# Remove fsck-related file system watermarks. # Remove fsck-related file system watermarks.
rm -f /fastboot /forcefsck rm -f /fastboot /forcefsck
# Make sure /dev/pts exists
mkdir -p /dev/pts
# This will mount all filesystems that do not have _netdev in # This will mount all filesystems that do not have _netdev in
# their option list. _netdev denotes a network filesystem. # their option list. _netdev denotes a network filesystem.

View File

@ -31,12 +31,12 @@
case "${1}" in case "${1}" in
start) start)
# Make sure /run/var is available before logging any messages # Make sure /run is available before logging any messages
if ! mountpoint /run >/dev/null; then if ! mountpoint /run >/dev/null; then
mount /run || failed=1 mount /run || failed=1
fi fi
mkdir -p /run/var /run/lock /run/shm mkdir -p /run/lock /run/shm
chmod 1777 /run/shm chmod 1777 /run/shm
log_info_msg "Mounting virtual file systems: ${INFO}/run" log_info_msg "Mounting virtual file systems: ${INFO}/run"

View File

@ -217,13 +217,13 @@ fi
# Copy the boot log on initial boot only # Copy the boot log on initial boot only
if [ "${previous}" == "N" -a "${runlevel}" != "S" ]; then if [ "${previous}" == "N" -a "${runlevel}" != "S" ]; then
cat /run/var/bootlog >> /var/log/boot.log cat $BOOTLOG >> /var/log/boot.log
# Mark the end of boot # Mark the end of boot
echo "--------" >> /var/log/boot.log echo "--------" >> /var/log/boot.log
# Remove the temporary file # Remove the temporary file
rm -f /run/var/bootlog 2> /dev/null rm -f $BOOTLOG 2> /dev/null
fi fi
# End rc # End rc

View File

@ -49,17 +49,17 @@ case "${1}" in
# Start the udev daemon to continually watch for, and act on, # Start the udev daemon to continually watch for, and act on,
# uevents # uevents
/sbin/udevd --daemon /lib/systemd-udevd --daemon
# Now traverse /sys in order to "coldplug" devices that have # Now traverse /sys in order to "coldplug" devices that have
# already been discovered # already been discovered
/sbin/udevadm trigger --action=add --type=subsystems /bin/udevadm trigger --action=add --type=subsystems
/sbin/udevadm trigger --action=add --type=devices /bin/udevadm trigger --action=add --type=devices
/sbin/udevadm trigger --action=change --type=devices /bin/udevadm trigger --action=change --type=devices
# Now wait for udevd to process the uevents we triggered # Now wait for udevd to process the uevents we triggered
if ! is_true "$OMIT_UDEV_SETTLE"; then if ! is_true "$OMIT_UDEV_SETTLE"; then
/sbin/udevadm settle /bin/udevadm settle
fi fi
# If any LVM based partitions are on the system, ensure they # If any LVM based partitions are on the system, ensure they

View File

@ -35,7 +35,7 @@ case "${1}" in
log_info_msg "Retrying failed uevents, if any..." log_info_msg "Retrying failed uevents, if any..."
# As of udev-186, the --run option is no longer valid # As of udev-186, the --run option is no longer valid
#rundir=$(/sbin/udevadm info --run) #rundir=$(/bin/udevadm info --run)
rundir=/run/udev rundir=/run/udev
# From Debian: "copy the rules generated before / was mounted # From Debian: "copy the rules generated before / was mounted
# read-write": # read-write":
@ -52,13 +52,13 @@ case "${1}" in
/bin/sed -e 's/#.*$//' /etc/sysconfig/udev_retry | /bin/grep -v '^$' | \ /bin/sed -e 's/#.*$//' /etc/sysconfig/udev_retry | /bin/grep -v '^$' | \
while read line ; do while read line ; do
for subsystem in $line ; do for subsystem in $line ; do
/sbin/udevadm trigger --subsystem-match=$subsystem --action=add /bin/udevadm trigger --subsystem-match=$subsystem --action=add
done done
done done
# Now wait for udevd to process the uevents we triggered # Now wait for udevd to process the uevents we triggered
if ! is_true "$OMIT_UDEV_RETRY_SETTLE"; then if ! is_true "$OMIT_UDEV_RETRY_SETTLE"; then
/sbin/udevadm settle /bin/udevadm settle
fi fi
evaluate_retval evaluate_retval

View File

@ -71,7 +71,7 @@ SUCCESS_SUFFIX="${BRACKET}[${SUCCESS} OK ${BRACKET}]${NORMAL}"
FAILURE_SUFFIX="${BRACKET}[${FAILURE} FAIL ${BRACKET}]${NORMAL}" FAILURE_SUFFIX="${BRACKET}[${FAILURE} FAIL ${BRACKET}]${NORMAL}"
WARNING_SUFFIX="${BRACKET}[${WARNING} WARN ${BRACKET}]${NORMAL}" WARNING_SUFFIX="${BRACKET}[${WARNING} WARN ${BRACKET}]${NORMAL}"
BOOTLOG=/run/var/bootlog BOOTLOG=/run/bootlog
KILLDELAY=3 KILLDELAY=3
# Set any user specified environment variables e.g. HEADLESS # Set any user specified environment variables e.g. HEADLESS

View File

@ -0,0 +1,12 @@
[Unit]
Description=Start ifupdown for %I
BindTo=sys-subsystem-net-devices-%i.device
ConditionPathExists=/etc/sysconfig/ifconfig.%i
[Service]
ExecStart=/sbin/ifup %I
ExecStop=/sbin/ifdown %I
RemainAfterExit=true
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,12 @@
[Unit]
Description=Start ifupdown for %I
BindTo=sys-subsystem-net-devices-%i.device
ConditionPathExists=/etc/sysconfig/ifconfig.%i
[Service]
ExecStart=/sbin/ifup %I
ExecStop=/sbin/ifdown %I
RemainAfterExit=true
[Install]
WantedBy=multi-user.target

View File

@ -35,6 +35,19 @@
</itemizedlist> </itemizedlist>
</listitem> </listitem>
--> -->
<listitem>
<para>2014-03-31</para>
<itemizedlist>
<listitem>
<para>[bdubbs] - THIS IS A MAJOR CHANGE.
Added systemd and dbus to the book.
Rewrote Chapters 6 and 7 to install systemd and
SystemV side by side with the option to reconfigure
and come up in the other boot method upon reboot.</para>
</listitem>
</itemizedlist>
</listitem>
<listitem> <listitem>
<para>2014-03-31</para> <para>2014-03-31</para>
<itemizedlist> <itemizedlist>

View File

@ -233,10 +233,7 @@
<para>attr-&attr-version;</para> <para>attr-&attr-version;</para>
</listitem> </listitem>
<listitem> <listitem>
<para>eudev-&eudev-version;</para> <para>dbus-&dbus-version;</para>
</listitem>
<listitem>
<para>eudev-&eudev-version;-manpages</para>
</listitem> </listitem>
<listitem> <listitem>
<para>expat-&expat-version;</para> <para>expat-&expat-version;</para>
@ -250,6 +247,9 @@
<listitem> <listitem>
<para>libcap-&libcap-version;</para> <para>libcap-&libcap-version;</para>
</listitem> </listitem>
<listitem>
<para>systemd-&systemd-version;</para>
</listitem>
<listitem> <listitem>
<para>XML::Parser-&xml-parser-version;</para> <para>XML::Parser-&xml-parser-version;</para>
</listitem> </listitem>

View File

@ -113,6 +113,15 @@
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term>D-Bus (&dbus-version;) - <token>&dbus-size;</token>:</term>
<listitem>
<para>Home page: <ulink url="&dbus-home;"/></para>
<para>Download: <ulink url="&dbus-url;"/></para>
<para>MD5 sum: <literal>&dbus-md5;</literal></para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term>DejaGNU (&dejagnu-version;) - <token>&dejagnu-size;</token>:</term> <term>DejaGNU (&dejagnu-version;) - <token>&dejagnu-size;</token>:</term>
<listitem> <listitem>
@ -157,7 +166,7 @@
<para>MD5 sum: <literal>&expect-md5;</literal></para> <para>MD5 sum: <literal>&expect-md5;</literal></para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<!--
<varlistentry> <varlistentry>
<term>Eudev (&eudev-version;) - <token>&eudev-size;</token>:</term> <term>Eudev (&eudev-version;) - <token>&eudev-size;</token>:</term>
<listitem> <listitem>
@ -174,7 +183,7 @@
<para>MD5 sum: <literal>&eudev-manpages-md5;</literal></para> <para>MD5 sum: <literal>&eudev-manpages-md5;</literal></para>
</listitem> </listitem>
</varlistentry> </varlistentry>
-->
<varlistentry> <varlistentry>
<term>File (&file-version;) - <token>&file-size;</token>:</term> <term>File (&file-version;) - <token>&file-size;</token>:</term>
<listitem> <listitem>
@ -595,6 +604,15 @@
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term>Systemd (&systemd-version;) - <token>&systemd-size;</token>:</term>
<listitem>
<para>Home page: <ulink url="&systemd-home;"/></para>
<para>Download: <ulink url="&systemd-url;"/></para>
<para>MD5 sum: <literal>&systemd-md5;</literal></para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term>Sysvinit (&sysvinit-version;) - <token>&sysvinit-size;</token>:</term> <term>Sysvinit (&sysvinit-version;) - <token>&sysvinit-size;</token>:</term>
<listitem> <listitem>
@ -639,24 +657,15 @@
<para>MD5 sum: <literal>&texinfo-md5;</literal></para> <para>MD5 sum: <literal>&texinfo-md5;</literal></para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<!--
<varlistentry>
<term>Systemd (&systemd-version;) - <token>&systemd-size;</token>:</term>
<listitem>
<para>Home page: <ulink url="&systemd-home;"/></para>
<para>Download: <ulink url="&systemd-url;"/></para>
<para>MD5 sum: <literal>&systemd-md5;</literal></para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term>Udev-lfs Tarball (&systemd-version;) - <token>&udev-lfs-size;</token>:</term> <term>Udev-lfs Tarball (&udev-lfs-version;) - <token>&udev-lfs-size;</token>:</term>
<listitem> <listitem>
<para>Download: <ulink url="&udev-lfs-url;"/></para> <para>Download: <ulink url="&udev-lfs-url;"/></para>
<para>MD5 sum: <literal>&udev-lfs-md5;</literal></para> <para>MD5 sum: <literal>&udev-lfs-md5;</literal></para>
</listitem> </listitem>
</varlistentry> </varlistentry>
-->
<varlistentry> <varlistentry>
<term>Util-linux (&util-linux-version;) - <token>&util-linux-size;</token>:</term> <term>Util-linux (&util-linux-version;) - <token>&util-linux-size;</token>:</term>
<listitem> <listitem>

View File

@ -65,15 +65,15 @@
<para>MD5 sum: <literal>&perl-libc-patch-md5;</literal></para> <para>MD5 sum: <literal>&perl-libc-patch-md5;</literal></para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<!--
<varlistentry> <varlistentry>
<term>Readline Upstream Fixes Patch - <token>&readline-fixes-patch-size;</token>:</term> <term>Systemd Compat Patch - <token>&systemd-compat-patch-size;</token>:</term>
<listitem> <listitem>
<para>Download: <ulink url="&patches-root;&readline-fixes-patch;"/></para> <para>Download: <ulink url="&patches-root;&systemd-compat-patch;"/></para>
<para>MD5 sum: <literal>&readline-fixes-patch-md5;</literal></para> <para>MD5 sum: <literal>&systemd-compat-patch-md5;</literal></para>
</listitem> </listitem>
</varlistentry> </varlistentry>
-->
<varlistentry> <varlistentry>
<term>Sysvinit Consolidated Patch - <token>&sysvinit-consolidated-patch-size;</token>:</term> <term>Sysvinit Consolidated Patch - <token>&sysvinit-consolidated-patch-size;</token>:</term>
<listitem> <listitem>

View File

@ -84,14 +84,14 @@
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="patch.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="patch.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sysklogd.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sysklogd.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sysvinit-header.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sysvinit.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sysvinit.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="tar.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="tar.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="texinfo.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="texinfo.xml"/>
<!--<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="systemd.xml"/>-->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="eudev.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="systemd.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="dbus.xml"/>
<!--<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="eudev.xml"/>-->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="util-linux.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="util-linux.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="man-db.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="man-db.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="vim.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="vim.xml"/>

186
chapter06/dbus.xml Normal file
View File

@ -0,0 +1,186 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
<sect1 id="ch-system-dbus" role="wrap">
<?dbhtml filename="dbus.html"?>
<sect1info condition="script">
<productname>dbus</productname>
<productnumber>&dbus-version;</productnumber>
<address>&dbus-url;</address>
</sect1info>
<title>D-Bus-&dbus-version;</title>
<indexterm zone="ch-system-dbus">
<primary sortas="a-dbus">D-Bus</primary>
</indexterm>
<sect2 role="package">
<title/>
<para>D-Bus is a message bus system, a simple way for applications to talk
to one another. D-Bus supplies both a system daemon (for events such as
"new hardware device added" or "printer queue changed") and a
per-user-login-session daemon (for general IPC needs among user
applications). Also, the message bus is built on top of a general one-to-one
message passing framework, which can be used by any two applications to
communicate directly (without going through the message bus daemon).</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
<segtitle>&diskspace;</segtitle>
<seglistitem>
<seg>&dbus-ch6-sbu;</seg>
<seg>&dbus-ch6-du;</seg>
</seglistitem>
</segmentedlist>
</sect2>
<sect2 role="installation">
<title>Installation of D-Bus</title>
<para>Prepare D-Bus for compilation:</para>
<screen><userinput remap="configure">./configure --prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--docdir=/usr/share/doc/dbus-&dbus-version; \
--with-console-auth-dir=/run/console</userinput></screen>
<variablelist>
<title>The meaning of the configure options:</title>
<varlistentry>
<term><parameter>--with-console-auth-dir=/run/console</parameter></term>
<listitem>
<para>This specifies the location of the ConsoleKit auth
directory.</para>
</listitem>
</varlistentry>
</variablelist>
<para>Compile the package:</para>
<screen><userinput remap="make">make</userinput></screen>
<para>This package does come with a testsuite, but it requires several
packages that are not included in LFS. Instructions for running the
testsuite can be found in the BLFS book at
<ulink url="&blfs-root;/view/svn/general/dbus.html"/>.</para>
<para>Install the package:</para>
<screen><userinput remap="install">make install</userinput></screen>
<para>The shared library needs to be moved to
<filename class="directory">/lib</filename>, and as a result the
<filename class="extension">.so</filename> file in
<filename class="directory">/usr/lib</filename> will need to be recreated:</para>
<screen><userinput remap="install">mv -v /usr/lib/libdbus-1.so.* /lib
ln -sfv ../../lib/$(readlink /usr/lib/libdbus-1.so) /usr/lib/libdbus-1.so</userinput></screen>
<para>Create a symlink, so that D-Bus and Systemd can use the same
<filename>machine-id</filename> file:</para>
<screen><userinput remap="install">ln -sv /etc/machine-id /var/lib/dbus</userinput></screen>
</sect2>
<sect2 id="contents-dbus" role="content">
<title>Contents of D-Bus</title>
<segmentedlist>
<segtitle>Installed programs</segtitle>
<segtitle>Installed libraries</segtitle>
<segtitle>Installed directories</segtitle>
<seglistitem>
<seg>dbus-cleanup-sockets, dbus-daemon, dbus-launch, dbus-monitor,
dbus-send, and dbus-uuidgen</seg>
<seg>libdbus-1.{a,so}</seg>
<seg>/etc/dbus-1, /usr/include/dbus-1.0, /usr/lib/dbus-1.0,
/usr/share/dbus-1, /usr/share/doc/dbus-&dbus-version;,
/var/lib/dbus</seg>
</seglistitem>
</segmentedlist>
<variablelist>
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
<?dbfo list-presentation="list"?>
<?dbhtml list-presentation="table"?>
<varlistentry id="dbus-cleanup-sockets">
<term><command>dbus-cleanup-sockets</command></term>
<listitem>
<para>Used to clean up leftover sockets in a directory.</para>
<indexterm zone="ch-system-dbus dbus-cleanup-sockets">
<primary sortas="b-dbus-cleanup-sockets">dbus-cleanup-sockets</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="dbus-daemon">
<term><command>dbus-daemon</command></term>
<listitem>
<para>The D-Bus message bus daemon.</para>
<indexterm zone="ch-system-dbus dbus-daemon">
<primary sortas="b-dbus-daemon">dbus-daemon</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="dbus-launch">
<term><command>dbus-launch</command></term>
<listitem>
<para>Starts <command>dbus-daemon</command> from a shell
script.</para>
<indexterm zone="ch-system-dbus dbus-launch">
<primary sortas="b-dbus-launch">dbus-launch</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="dbus-monitor">
<term><command>dbus-monitor</command></term>
<listitem>
<para>Monitors messages passing through a D-Bus message bus.</para>
<indexterm zone="ch-system-dbus dbus-monitor">
<primary sortas="b-dbus-monitor">dbus-monitor</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="dbus-send">
<term><command>dbus-send</command></term>
<listitem>
<para>Sends a message to a D-Bus message bus.</para>
<indexterm zone="ch-system-dbus dbus-send">
<primary sortas="b-dbus-send">dbus-send</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="dbus-uuidgen">
<term><command>dbus-uuidgen</command></term>
<listitem>
<para>Generates a universally unique ID.</para>
<indexterm zone="ch-system-dbus dbus-uuidgen">
<primary sortas="b-dbus-uuidgen">dbus-uuidgen</primary>
</indexterm>
</listitem>
</varlistentry>
</variablelist>
</sect2>
</sect1>

View File

@ -5,28 +5,26 @@
%general-entities; %general-entities;
]> ]>
<sect1 id="ch-system-udev" role="wrap"> <sect1 id="ch-system-systemd" role="wrap">
<?dbhtml filename="udev.html"?> <?dbhtml filename="systemd.html"?>
<sect1info condition="script"> <sect1info condition="script">
<productname>udev</productname> <productname>systemd</productname>
<productnumber>&systemd-version;</productnumber> <productnumber>&systemd-version;</productnumber>
<address>&systemd-url;</address> <address>&systemd-url;</address>
</sect1info> </sect1info>
<title>Udev-&systemd-version; (Extracted from systemd-&systemd-version;)</title> <title>Systemd-&systemd-version;</title>
<indexterm zone="ch-system-udev"> <indexterm zone="ch-system-systemd">
<primary sortas="a-Udev">Udev</primary> <primary sortas="a-Systemd">Systemd</primary>
</indexterm> </indexterm>
<sect2 role="package"> <sect2 role="package">
<title/> <title/>
<para>The Udev package contains programs for dynamic creation of device <para>The Systemd package contains programs for controlling the startup,
nodes. The development of udev has been merged with systemd, but running, and shutdown of the system.</para>
most of systemd is incompatible with LFS. Here we build and install just
the needed udev files.</para>
<segmentedlist> <segmentedlist>
<segtitle>&buildtime;</segtitle> <segtitle>&buildtime;</segtitle>
@ -40,63 +38,155 @@
</sect2> </sect2>
<sect2 role="installation"> <sect2 role="installation">
<title>Installation of Udev</title> <title>Installation of Systemd</title>
<note><para>This package is a little different from other packages. The <para>First, create a file to allow Systemd to build when using Util-Linux
initial package that is extracted is built in Chapter 5:</para>
<filename>systemd-&systemd-version;.tar.xz</filename> even though the
application we are installing is udev. After changing to the
systemd directory, follow the instructions below.</para></note>
<para>The udev-lfs tarball contains LFS-specific files used to build <screen><userinput remap="pre">cat &gt; config.cache &lt;&lt; "EOF"
Udev. Unpack it into the systemd source directory:</para> <literal>KILL=/bin/kill
HAVE_BLKID=1
BLKID_LIBS="-lblkid"
BLKID_CFLAGS="-I/tools/include/blkid"</literal>
EOF</userinput></screen>
<screen><userinput remap="pre">tar -xvf ../&udev-lfs;.tar.bz2</userinput></screen> <para>Aditionally, fix a build error when using Util-Linux built in
Chapter 5:</para>
<para>Create two symbolic links to header files and set an <screen><userinput remap="pre">sed -i "s:blkid/::" $(grep -rl "blkid/blkid.h")</userinput></screen>
environment variable to properly use <xref linkend="ch-tools-util-linux"/>.</para>
<screen><userinput remap="pre">ln -svf /tools/include/blkid /usr/include <para>Apply a patch so that compat <command>pkg-config</command> files get
ln -svf /tools/include/uuid /usr/include installed without installing compat libs which are useless on LFS:</para>
export LD_LIBRARY_PATH=/tools/lib</userinput></screen>
<para>Build the package:</para> <screen><userinput remap="pre">patch -Np1 -i ../&systemd-compat-patch;</userinput></screen>
<screen><userinput remap="make">make -f &udev-lfs;/Makefile.lfs</userinput></screen> <para>Prepare Systemd for compilation:</para>
<screen><userinput remap="configure">./configure --prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--config-cache \
--with-rootprefix= \
--with-rootlibdir=/lib \
--enable-split-usr \
--disable-gudev \
--without-python \
--docdir=/usr/share/doc/systemd-&systemd-version; \
--with-dbuspolicydir=/etc/dbus-1/system.d \
--with-dbusinterfacedir=/usr/share/dbus-1/interfaces \
--with-dbussessionservicedir=/usr/share/dbus-1/services \
--with-dbussystemservicedir=/usr/share/dbus-1/system-services</userinput></screen>
<variablelist>
<title>The meaning of the configure options:</title>
<varlistentry>
<term><parameter>--config-cache</parameter></term>
<listitem>
<para>This switch tells the build system to use
the <filename>config.cache</filename> file which
was created earlier.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>--with-root*</parameter></term>
<listitem>
<para>These switches ensure that core programs and
shared libraries are installed in the subdirectories
of the root partition.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>--enable-split-usr</parameter></term>
<listitem>
<para>This switch ensures that Systemd will work on
systems where /bin, /lib and /sbin directories are not
symlinks to their /usr counterparts.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>--disable-gudev --without-python</parameter></term>
<listitem>
<para>These switches disable optional features because
LFS does not provide their dependencies.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>--with-dbus*</parameter></term>
<listitem>
<para>These switches ensure that D-Bus configuratil files
get installed in the correct locations.</para>
</listitem>
</varlistentry>
</variablelist>
<para>Compile the package:</para>
<screen><userinput remap="make">make LIBRARY_PATH=/tools/lib</userinput></screen>
<para>First prevent few broken test cases from running:</para>
<screen><userinput remap="test">sed -e "s:test/udev-test.pl::g" \
-e "s:test-bus-cleanup\$(EXEEXT) ::g" \
-e "s:test-bus-gvariant\$(EXEEXT) ::g" \
-i Makefile</userinput></screen>
<para>To test the results, issue:</para>
<screen><userinput remap="test">make -k check</userinput></screen>
<para>Note that some tests might fail because the test are being run in a
chroot environment. For full test coverage, the test suite should be run
from a system booted using Systemd.</para>
<para>Install the package:</para> <para>Install the package:</para>
<screen><userinput remap="install">make -f &udev-lfs;/Makefile.lfs install</userinput></screen> <screen><userinput remap="install">make LD_LIBRARY_PATH=/tools/lib install</userinput></screen>
<caution><para>There are several places within the <para>Move NSS myhostname library to <filename
<application>systemd</application> source code that have explicit directory class="directory">/lib</filename>:</para>
paths embedded. For instance, the binary version of the hardware
database's path and file name used at run time,
<filename>/etc/udev/hwdb.bin</filename>, cannot be changed without explicit
changes to the source code.</para></caution>
<para>Now initialize the hardware database:</para> <screen><userinput remap="install">mv -v /usr/lib/libnss_myhostname.so.2 /lib</userinput></screen>
<screen><userinput remap="install">build/udevadm hwdb --update</userinput></screen> <para>Remove an unnecessary directory:</para>
<para>Finally set up the persistent network udev rules. This task will be <screen><userinput remap="install">rm -rfv /usr/lib/rpm</userinput></screen>
explained in detail in <xref linkend='stable-net-names'/>. Note that the
<filename class='directory'>/sys</filename> and <filename
class='directory'>/proc</filename> filesystems must be mounted in the
chroot environment as explained at the beginning of this chapter for the
following script to work.</para>
<screen><userinput remap="install">bash &udev-lfs;/init-net-rules.sh</userinput></screen> <para>Create the Sysvinit compatibility symlinks, and move some man pages
and a library that conflict with <xref linkend="ch-system-sysvinit"/> so
both systems can be installed side-by-side:</para>
<para>Do some cleanup:</para> <screen><userinput remap="install">for tool in runlevel reboot shutdown poweroff halt telinit; do
ln -sfv ../bin/systemctl /sbin/${tool}-systemd
mv -v /usr/share/man/man8/${tool}.8 /usr/share/man/man8/${tool}-systemd.8
done
<screen><userinput remap="install">rm -fv /usr/include/{uuid,blkid} ln -sfv ../lib/systemd/systemd /sbin/init-systemd
unset LD_LIBRARY_PATH</userinput></screen> mv -v /etc/init.d /etc/init.d-systemd</userinput></screen>
<para>Remove a reference to a non-existent group:</para>
<screen><userinput remap="install">sed -i "s:0775 root lock:0755 root root:g" /usr/lib/tmpfiles.d/legacy.conf</userinput></screen>
<para>Create the <filename>/etc/machine-id</filename> file needed by
Journald:</para>
<screen><userinput remap="install">systemd-machine-id-setup</userinput></screen>
<para>Finally install some LFS specific udev rules:</para>
<screen><userinput remap="install">tar -xf ../&udev-lfs-version;.tar.bz2
make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
</sect2> </sect2>
<sect2 id="contents-udev" role="content"> <sect2 id="contents-systemd" role="content">
<title>Contents of Udev</title> <title>Contents of Systemd</title>
<segmentedlist> <segmentedlist>
<segtitle>Installed programs</segtitle> <segtitle>Installed programs</segtitle>
@ -104,12 +194,22 @@ unset LD_LIBRARY_PATH</userinput></screen>
<segtitle>Installed directories</segtitle> <segtitle>Installed directories</segtitle>
<seglistitem> <seglistitem>
<seg>accelerometer, ata_id, cdrom_id, collect, mtd_probe, <seg>bootctl, busctl, halt, hostnamectl, init, journalctl, kernel-install,
scsi_id, v4l_id, udevadm, and udevd</seg> localectl, loginctl, machinectl, poweroff, reboot, runlevel, shutdown,
systemctl, systemd-analyze, systemd-ask-password, systemd-cat, systemd-cgls,
systemd-cgtop, systemd-coredumpctl, systemd-delta, systemd-detect-virt,
systemd-inhibit, systemd-machine-id-setup, systemd-notify, systemd-nspawn,
systemd-run, systemd-stdio-bridge, systemd-tmpfiles, systemd-tty-ask-password-agent,
telinit, timedatectl, and udevadm</seg>
<seg>libudev.so</seg> <seg>libnss_myhostname.so.2, libsystemd.so, libudev.so</seg>
<seg>/etc/binfmt.d, /etc/init.d, /etc/kernel, /etc/modules-load.d,
<seg>/etc/udev, /lib/udev, /lib/firmware, /usr/share/doc/udev</seg> /etc/sysctl.d, /etc/systemd, /etc/tmpfiles.d, /etc/udev,
/etc/xdg/systemd, /lib/systemd, /lib/udev, /usr/include/systemd,
/usr/lib/binfmt.d, /usr/lib/kernel, /usr/lib/modules-load.d,
/usr/lib/sysctl.d, /usr/lib/systemd, /usr/lib/tmpfiles.d,
/usr/share/doc/systemd-&systemd-version;, /usr/share/systemd,
/var/lib/systemd, /var/log/journal</seg>
</seglistitem> </seglistitem>
</segmentedlist> </segmentedlist>
@ -118,48 +218,363 @@ unset LD_LIBRARY_PATH</userinput></screen>
<?dbfo list-presentation="list"?> <?dbfo list-presentation="list"?>
<?dbhtml list-presentation="table"?> <?dbhtml list-presentation="table"?>
<varlistentry id="ata_id"> <varlistentry id="bootctl">
<term><command>ata_id</command></term> <term><command>bootctl</command></term>
<listitem> <listitem>
<para>Provides Udev with a unique string and <para>used to query the firmware and boot manager settings.</para>
additional information (uuid, label) for an ATA drive</para> <indexterm zone="ch-system-systemd bootctl">
<indexterm zone="ch-system-udev ata_id"> <primary sortas="b-bootctl">bootctl</primary>
<primary sortas="b-ata_id">ata_id</primary>
</indexterm> </indexterm>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry id="cdrom_id"> <varlistentry id="busctl">
<term><command>cdrom_id</command></term> <term><command>busctl</command></term>
<listitem> <listitem>
<para>Provides Udev with the capabilities of a <para>used to introspect and monitor the D-Bus bus.</para>
CD-ROM or DVD-ROM drive</para> <indexterm zone="ch-system-systemd busctl">
<indexterm zone="ch-system-udev cdrom_id"> <primary sortas="b-busctl">busctl</primary>
<primary sortas="b-cdrom_id">cdrom_id</primary>
</indexterm> </indexterm>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry id="collect"> <varlistentry id="halt">
<term><command>collect</command></term> <term><command>halt</command></term>
<listitem> <listitem>
<para>Given an ID for the current uevent and a list of <para>Normally invokes <command>shutdown</command> with the
IDs (for all target uevents), registers the current ID <parameter>-h</parameter> option, except when already in run-level 0,
and indicates whether all target IDs have been registered</para> then it tells the kernel to halt the system; it notes in the
<indexterm zone="ch-system-udev collect"> file <filename>/var/log/wtmp</filename> that the system is being
<primary sortas="b-collect">collect</primary> brought down.</para>
<indexterm zone="ch-system-systemd halt">
<primary sortas="b-halt">halt</primary>
</indexterm> </indexterm>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry id="scsi_id"> <varlistentry id="hostnamectl">
<term><command>scsi_id</command></term> <term><command>hostnamectl</command></term>
<listitem> <listitem>
<para>Provides Udev with a unique SCSI identifier <para>used to query and change the system hostname and related
based on the data returned from sending a SCSI INQUIRY command to settings.</para>
the specified device</para> <indexterm zone="ch-system-systemd hostnamectl">
<indexterm zone="ch-system-udev scsi_id"> <primary sortas="b-hostnamectl">hostnamectl</primary>
<primary sortas="b-scsi_id">scsi_id</primary> </indexterm>
</listitem>
</varlistentry>
<varlistentry id="init">
<term><command>init</command></term>
<listitem>
<para>The first process to be started when the kernel has initialized
the hardware which takes over the boot process and starts all the
proceses it is instructed to.</para>
<indexterm zone="ch-system-systemd init">
<primary sortas="b-init">init</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="journalctl">
<term><command>journalctl</command></term>
<listitem>
<para>used to query the contents of the Systemd Journal.</para>
<indexterm zone="ch-system-systemd journalctl">
<primary sortas="b-journalctl">journalctl</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="kernel-install">
<term><command>kernel-install</command></term>
<listitem>
<para>used to add and remove kernel and initramfs images to and
from /boot.</para>
<indexterm zone="ch-system-systemd kernel-install">
<primary sortas="b-kernel-install">kernel-install</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="localectl">
<term><command>localectl</command></term>
<listitem>
<para>used to query and change the system locale and keyboard layout
settings.</para>
<indexterm zone="ch-system-systemd localectl">
<primary sortas="b-localectl">localectl</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="loginctl">
<term><command>loginctl</command></term>
<listitem>
<para>used to introspect and control the state of the Systemd Login
Manager.</para>
<indexterm zone="ch-system-systemd loginctl">
<primary sortas="b-loginctl">loginctl</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="machinectl">
<term><command>machinectl</command></term>
<listitem>
<para>used to introspect and control the state of the Systemd Virtual
Machine and Container Registration Manager</para>
<indexterm zone="ch-system-systemd machinectl">
<primary sortas="b-machinectl">machinectl</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="poweroff">
<term><command>poweroff</command></term>
<listitem>
<para>Tells the kernel to halt the system and switch off the computer
(see <command>halt</command>).</para>
<indexterm zone="ch-system-systemd poweroff">
<primary sortas="b-poweroff">poweroff</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="reboot">
<term><command>reboot</command></term>
<listitem>
<para>Tells the kernel to reboot the system (see
<command>halt</command>).</para>
<indexterm zone="ch-system-systemd reboot">
<primary sortas="b-reboot">reboot</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="runlevel">
<term><command>runlevel</command></term>
<listitem>
<para>Reports the previous and the current run-level, as noted in the
last run-level record in <filename>/var/run/utmp</filename>.</para>
<indexterm zone="ch-system-systemd runlevel">
<primary sortas="b-runlevel">runlevel</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="shutdown">
<term><command>shutdown</command></term>
<listitem>
<para>Brings the system down in a secure way, signaling all processes
and notifying all logged-in users.</para>
<indexterm zone="ch-system-systemd shutdown">
<primary sortas="b-shutdown">shutdown</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="systemctl">
<term><command>systemctl</command></term>
<listitem>
<para>used to introspect and control the state of the Systemd system and
service manager.</para>
<indexterm zone="ch-system-systemd systemctl">
<primary sortas="b-systemctl">systemctl</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="systemd-analyze">
<term><command>systemd-analyze</command></term>
<listitem>
<para>used to determine system boot-up performance of the current boot.
</para>
<indexterm zone="ch-system-systemd systemd-analyze">
<primary sortas="b-systemd-analyze">systemd-analyze</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="systemd-ask-password">
<term><command>systemd-ask-password</command></term>
<listitem>
<para>used to query a system password or passphrase from the user, using a
question message specified on the command line.</para>
<indexterm zone="ch-system-systemd systemd-ask-password">
<primary sortas="b-systemd-ask-password">systemd-ask-password</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="systemd-cat">
<term><command>systemd-cat</command></term>
<listitem>
<para>used to connect STDOUT and STDERR of a process with the Journal.
</para>
<indexterm zone="ch-system-systemd systemd-cat">
<primary sortas="b-systemd-cat">systemd-cat</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="systemd-cgls">
<term><command>systemd-cgls</command></term>
<listitem>
<para>recursively shows the contents of the selected Linux control group
hierarchy in a tree.</para>
<indexterm zone="ch-system-systemd systemd-cgls">
<primary sortas="b-systemd-cgls">systemd-cgls</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="systemd-cgtop">
<term><command>systemd-cgtop</command></term>
<listitem>
<para>shows the top control groups of the local Linux control group hierarchy,
ordered by their CPU, memory and disk I/O load.</para>
<indexterm zone="ch-system-systemd systemd-cgtop">
<primary sortas="b-systemd-cgtop">systemd-cgtop</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="systemd-coredumpctl">
<term><command>systemd-coredumpctl</command></term>
<listitem>
<para>used to retrieve coredumps from the Systemd Journal</para>
<indexterm zone="ch-system-systemd systemd-coredumpctl">
<primary sortas="b-systemd-coredumpctl">systemd-coredumpctl</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="systemd-delta">
<term><command>systemd-delta</command></term>
<listitem>
<para>used to identify and compare configuration files in
<filename class="directory">/etc</filename> that override default
counterparts in <filename class="directory">/usr</filename>.</para>
<indexterm zone="ch-system-systemd systemd-delta">
<primary sortas="b-systemd-delta">systemd-delta</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="systemd-detect-virt">
<term><command>systemd-detect-virt</command></term>
<listitem>
<para>detects execution in a virtualized environment.</para>
<indexterm zone="ch-system-systemd systemd-detect-virt">
<primary sortas="b-systemd-detect-virt">systemd-detect-virt</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="systemd-inhibit">
<term><command>systemd-inhibit</command></term>
<listitem>
<para>used to execute a program with a shutdown, sleep or idle inhibitor lock
taken.</para>
<indexterm zone="ch-system-systemd systemd-inhibit">
<primary sortas="b-systemd-inhibit">systemd-inhibit</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="systemd-machine-id-setup">
<term><command>systemd-machine-id-setup</command></term>
<listitem>
<para>used by system installer tools to initialize the machine ID stored in
<filename>/etc/machine-id</filename> at install time with a randomly
generated ID.</para>
<indexterm zone="ch-system-systemd systemd-machine-id-setup">
<primary sortas="b-systemd-machine-id-setup">systemd-machine-id-setup</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="systemd-notify">
<term><command>systemd-notify</command></term>
<listitem>
<para>used by daemon scripts to notify the init system about status changes.
</para>
<indexterm zone="ch-system-systemd systemd-notify">
<primary sortas="b-systemd-notify">systemd-notify</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="systemd-nspawn">
<term><command>systemd-nspawn</command></term>
<listitem>
<para>used to run a command or OS in a light-weight namespace container.</para>
<indexterm zone="ch-system-systemd systemd-nspawn">
<primary sortas="b-systemd-nspawn">systemd-nspawn</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="systemd-run">
<term><command>systemd-run</command></term>
<listitem>
<para>used to create and start a transient .service or a .scope unit and
run the specified command in it.</para>
<indexterm zone="ch-system-systemd systemd-run">
<primary sortas="b-systemd-run">systemd-run</primary>
</indexterm>
</listitem>
</varlistentry>
<!-- <varlistentry id="systemd-stdio-bridge">
<term><command>systemd-stdio-bridge</command></term>
<listitem>
<para>To be completed</para>
<indexterm zone="ch-system-systemd systemd-stdio-bridge">
<primary sortas="b-systemd-stdio-bridge">systemd-stdio-bridge</primary>
</indexterm>
</listitem>
</varlistentry> -->
<varlistentry id="systemd-tmpfiles">
<term><command>systemd-tmpfiles</command></term>
<listitem>
<para>creates, deletes and cleans up volatile and temporary files and directories,
based on the configuration file format and location specified in
<filename class="directory">tmpfiles.d</filename> directories.</para>
<indexterm zone="ch-system-systemd systemd-tmpfiles">
<primary sortas="b-systemd-tmpfiles">systemd-tmpfiles</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="systemd-tty-ask-password-agent">
<term><command>systemd-tty-ask-password-agent</command></term>
<listitem>
<para>used to list or process pending Systemd password requests</para>
<indexterm zone="ch-system-systemd systemd-tty-ask-password-agent">
<primary sortas="b-systemd-tty-ask-password-agent">systemd-tty-ask-password-agent</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="telinit">
<term><command>telinit</command></term>
<listitem>
<para>Tells <command>init</command> which run-level to change to.</para>
<indexterm zone="ch-system-systemd telinit">
<primary sortas="b-telinit">telinit</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="timedatectl">
<term><command>timedatectl</command></term>
<listitem>
<para>used to query and change the system clock and its settings.
</para>
<indexterm zone="ch-system-systemd timedatectl">
<primary sortas="b-timedatectl">timedatectl</primary>
</indexterm> </indexterm>
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -167,24 +582,22 @@ unset LD_LIBRARY_PATH</userinput></screen>
<varlistentry id="udevadm"> <varlistentry id="udevadm">
<term><command>udevadm</command></term> <term><command>udevadm</command></term>
<listitem> <listitem>
<para>Generic udev administration tool: controls the udevd daemon, <para>Generic Udev administration tool: controls the udevd daemon,
provides info from the Udev database, monitors uevents, waits for provides info from the Udev database, monitors uevents, waits for
uevents to finish, tests Udev configuration, and triggers uevents uevents to finish, tests Udev configuration, and triggers uevents
for a given device</para> for a given device.</para>
<indexterm zone="ch-system-udev udevadm"> <indexterm zone="ch-system-systemd udevadm">
<primary sortas="b-udevadm">udevadm</primary> <primary sortas="b-udevadm">udevadm</primary>
</indexterm> </indexterm>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry id="udevd"> <varlistentry id="libsystemd">
<term><command>udevd</command></term> <term><filename class="libraryfile">libsystemd</filename></term>
<listitem> <listitem>
<para>A daemon that listens for uevents on the netlink socket, <para>Systemd utility library.</para>
creates devices and runs the configured external programs in <indexterm zone="ch-system-systemd libsystemd">
response to these uevents</para> <primary sortas="c-libsystemd">libsystemd</primary>
<indexterm zone="ch-system-udev udevd">
<primary sortas="b-udevd">udevd</primary>
</indexterm> </indexterm>
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -192,24 +605,13 @@ unset LD_LIBRARY_PATH</userinput></screen>
<varlistentry id="libudev"> <varlistentry id="libudev">
<term><filename class="libraryfile">libudev</filename></term> <term><filename class="libraryfile">libudev</filename></term>
<listitem> <listitem>
<para>A library interface to udev device information</para> <para>A library to access Udev device information.</para>
<indexterm zone="ch-system-udev libudev"> <indexterm zone="ch-system-systemd libudev">
<primary sortas="c-libudev">libudev</primary> <primary sortas="c-libudev">libudev</primary>
</indexterm> </indexterm>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry id="etc-udev">
<term><filename class="directory">/etc/udev</filename></term>
<listitem>
<para>Contains Udev configuration files,
device permissions, and rules for device naming</para>
<indexterm zone="ch-system-udev etc-udev">
<primary sortas="e-/etc/udev">/etc/udev</primary>
</indexterm>
</listitem>
</varlistentry>
</variablelist> </variablelist>
</sect2> </sect2>

View File

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<sect1 role="dummy">
<sect1info>
<othername>$LastChangedBy$</othername>
<date>$Date$</date>
</sect1info>
<title>System V</title>
<para/>
</sect1>

View File

@ -82,6 +82,14 @@
<screen><userinput remap="install">make -C src install</userinput></screen> <screen><userinput remap="install">make -C src install</userinput></screen>
<para>Move files that have a name conflict with <xref linkend="ch-system-systemd"/>
so that both packages can be installed side-by-side:</para>
<screen><userinput remap="install">for p in init halt poweroff reboot runlevel shutdown telinit; do
mv -v /sbin/$p /sbin/$p-sysv
mv -v /usr/share/man/man8/$p.8 /usr/share/man/man8/$p-sysv.8
done</userinput></screen>
</sect2> </sect2>
<sect2 id="contents-sysvinit" role="content"> <sect2 id="contents-sysvinit" role="content">
@ -122,7 +130,7 @@
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry id="halt"> <varlistentry id="halt-sysv">
<term><command>halt</command></term> <term><command>halt</command></term>
<listitem> <listitem>
<para>Normally invokes <command>shutdown</command> with the <para>Normally invokes <command>shutdown</command> with the
@ -130,19 +138,19 @@
then it tells the kernel to halt the system; it notes in the then it tells the kernel to halt the system; it notes in the
file <filename>/var/log/wtmp</filename> that the system is being file <filename>/var/log/wtmp</filename> that the system is being
brought down</para> brought down</para>
<indexterm zone="ch-system-sysvinit halt"> <indexterm zone="ch-system-sysvinit halt-sysv">
<primary sortas="b-halt">halt</primary> <primary sortas="b-halt">halt</primary>
</indexterm> </indexterm>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry id="init"> <varlistentry id="init-sysv">
<term><command>init</command></term> <term><command>init</command></term>
<listitem> <listitem>
<para>The first process to be started when the kernel has initialized <para>The first process to be started when the kernel has initialized
the hardware which takes over the boot process and starts all the the hardware which takes over the boot process and starts all the
proceses it is instructed to</para> proceses it is instructed to</para>
<indexterm zone="ch-system-sysvinit init"> <indexterm zone="ch-system-sysvinit init-sysv">
<primary sortas="b-init">init</primary> <primary sortas="b-init">init</primary>
</indexterm> </indexterm>
</listitem> </listitem>
@ -160,55 +168,55 @@
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry id="poweroff"> <varlistentry id="poweroff-sysv">
<term><command>poweroff</command></term> <term><command>poweroff</command></term>
<listitem> <listitem>
<para>Tells the kernel to halt the system and switch off the computer <para>Tells the kernel to halt the system and switch off the computer
(see <command>halt</command>)</para> (see <command>halt</command>)</para>
<indexterm zone="ch-system-sysvinit poweroff"> <indexterm zone="ch-system-sysvinit poweroff-sysv">
<primary sortas="b-poweroff">poweroff</primary> <primary sortas="b-poweroff">poweroff</primary>
</indexterm> </indexterm>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry id="reboot"> <varlistentry id="reboot-sysv">
<term><command>reboot</command></term> <term><command>reboot</command></term>
<listitem> <listitem>
<para>Tells the kernel to reboot the system (see <para>Tells the kernel to reboot the system (see
<command>halt</command>)</para> <command>halt</command>)</para>
<indexterm zone="ch-system-sysvinit reboot"> <indexterm zone="ch-system-sysvinit reboot-sysv">
<primary sortas="b-reboot">reboot</primary> <primary sortas="b-reboot">reboot</primary>
</indexterm> </indexterm>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry id="runlevel"> <varlistentry id="runlevel-sysv">
<term><command>runlevel</command></term> <term><command>runlevel</command></term>
<listitem> <listitem>
<para>Reports the previous and the current run-level, as noted in the <para>Reports the previous and the current run-level, as noted in the
last run-level record in <filename>/var/run/utmp</filename></para> last run-level record in <filename>/var/run/utmp</filename></para>
<indexterm zone="ch-system-sysvinit runlevel"> <indexterm zone="ch-system-sysvinit runlevel-sysv">
<primary sortas="b-runlevel">runlevel</primary> <primary sortas="b-runlevel">runlevel</primary>
</indexterm> </indexterm>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry id="shutdown"> <varlistentry id="shutdown-sysv">
<term><command>shutdown</command></term> <term><command>shutdown</command></term>
<listitem> <listitem>
<para>Brings the system down in a secure way, signaling all processes <para>Brings the system down in a secure way, signaling all processes
and notifying all logged-in users</para> and notifying all logged-in users</para>
<indexterm zone="ch-system-sysvinit shutdown"> <indexterm zone="ch-system-sysvinit shutdown-sysv">
<primary sortas="b-shutdown">shutdown</primary> <primary sortas="b-shutdown">shutdown</primary>
</indexterm> </indexterm>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry id="telinit"> <varlistentry id="telinit-sysv">
<term><command>telinit</command></term> <term><command>telinit</command></term>
<listitem> <listitem>
<para>Tells <command>init</command> which run-level to change to</para> <para>Tells <command>init</command> which run-level to change to</para>
<indexterm zone="ch-system-sysvinit telinit"> <indexterm zone="ch-system-sysvinit telinit-sysv">
<primary sortas="b-telinit">telinit</primary> <primary sortas="b-telinit">telinit</primary>
</indexterm> </indexterm>
</listitem> </listitem>

View File

@ -23,8 +23,9 @@
<sect2 role="package"> <sect2 role="package">
<title/> <title/>
<para>The LFS-Bootscripts package contains a set of scripts to start/stop the <para>The LFS-Bootscripts package contains a set of scripts to start/stop
LFS system at bootup/shutdown.</para> the LFS system at bootup/shutdown. The networking systemd unit file is
also installed.</para>
<segmentedlist> <segmentedlist>
<segtitle>&buildtime;</segtitle> <segtitle>&buildtime;</segtitle>
@ -51,6 +52,7 @@
<title>Contents of LFS-Bootscripts</title> <title>Contents of LFS-Bootscripts</title>
<segmentedlist> <segmentedlist>
<segtitle>Installed scripts</segtitle> <segtitle>Installed scripts</segtitle>
<segtitle>Installed unit</segtitle>
<segtitle>Installed directories</segtitle> <segtitle>Installed directories</segtitle>
<seglistitem> <seglistitem>
@ -58,6 +60,7 @@
ifup, localnet, modules, mountfs, mountvirtfs, network, rc, reboot, ifup, localnet, modules, mountfs, mountvirtfs, network, rc, reboot,
sendsignals, setclock, ipv4-static, swap, sysctl, sysklogd, template, sendsignals, setclock, ipv4-static, swap, sysctl, sysklogd, template,
udev, and udev_retry</seg> udev, and udev_retry</seg>
<seg>ifupdown@.service</seg>
<seg>/etc/rc.d, /etc/init.d (symbolic link), /etc/sysconfig, <seg>/etc/rc.d, /etc/init.d (symbolic link), /etc/sysconfig,
/lib/services, /lib/lsb (symbolic link)</seg> /lib/services, /lib/lsb (symbolic link)</seg>
</seglistitem> </seglistitem>

View File

@ -9,14 +9,14 @@
<?dbhtml dir="chapter07"?> <?dbhtml dir="chapter07"?>
<?dbhtml filename="chapter07.html"?> <?dbhtml filename="chapter07.html"?>
<title>Setting Up System Bootscripts</title> <title>System Configuration and Bootscripts</title>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="introduction.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="introduction.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bootscripts.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="network.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="network.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="hosts.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="hosts.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="udev.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="udev.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="symlinks.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="symlinks.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bootscripts.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="usage.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="usage.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="hostname.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="hostname.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="setclock.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="setclock.xml"/>

View File

@ -15,14 +15,14 @@
<secondary>configuring</secondary> <secondary>configuring</secondary>
</indexterm> </indexterm>
<para>Part of the job of the <command>localnet</command> script is setting the <para>Durein gthe boot process, both Systemd and System V use the same
system's hostname. This needs to be configured in the file for establixhg the system's hostname.This needs to be configured by
<filename>/etc/sysconfig/network</filename> file.</para> creating <filename>/etc/hostname</filename>.</para>
<para>Create the <filename>/etc/sysconfig/network</filename> file and enter a <para>Create the <filename>/etc/hostname</filename> file and enter a
hostname by running:</para> hostname by running:</para>
<screen><userinput>echo "HOSTNAME=<replaceable>&lt;lfs&gt;</replaceable>" &gt; /etc/sysconfig/network</userinput></screen> <screen><userinput>echo "<replaceable>&lt;lfs&gt;</replaceable>" &gt; /etc/hostname</userinput></screen>
<para><replaceable>&lt;lfs&gt;</replaceable> needs to be replaced with the name given <para><replaceable>&lt;lfs&gt;</replaceable> needs to be replaced with the name given
to the computer. Do not enter the Fully Qualified Domain Name (FQDN) here. That to the computer. Do not enter the Fully Qualified Domain Name (FQDN) here. That

View File

@ -10,82 +10,208 @@
<title>Introduction</title> <title>Introduction</title>
<para>This chapter discusses configuration files and boot scripts. <para>Booting a Linux system involves several tasks. The process must
First, the general configuration files needed to set up networking are mount both virtual and real file systems, initialize devices, activate swap,
presented.</para> check file systems for integrity, mount any swap partitions or files, set
the system clock, bring up networking, start any daemons required by the
system, and accomplish any other custom tasks needed by the user. This
process must be organized to ensure the tasks are performed in the correct
order but, at the same time, be executed as fast as possible.</para>
<itemizedlist> <para>In the packages that were installed in Chapter 6, there were two
<listitem> different boot systems installed. LFS provides the ability to easily
<para><xref linkend="ch-scripts-network" role="."/></para> select which system the user wants to use and to compare and contrast the
</listitem> two systems by actually running each system on the local computer. The
<listitem> advantages and disadvantages of these systems is presented below.</para>
<para><xref linkend="ch-scripts-hosts" role="."/></para>
</listitem>
</itemizedlist>
<para>Second, issues that affect the proper setup of devices are <sect2 id='sysv-desc'>
discussed.</para> <title>System V</title>
<itemizedlist> <para>System V is the classic boot process that has been used in Unix and
<listitem> Unix-like systems such as Linux since about 1983. It consists of a small
<para><xref linkend="ch-scripts-udev" role="."/></para> program, <command>init</command>, that sets up basic programs such as
</listitem> <command>login</command> (via getty) and runs a script. This script,
<listitem> usually named <command>rc</command>, controls the execution of a set of
<para><xref linkend="ch-scripts-symlinks" role="."/></para> additional scripts that perform the tasks required to initialize the
</listitem> system.</para>
</itemizedlist>
<para>The next sections detail how to install and configure the LFS system <para>The <command>init</command> program is controlled by the
scripts needed during the boot process. Most of these scripts will work <filename>/etc/inittab</filename> file and is organized into run levels that
without modification, but a few require additional configuration files can be run by the user:</para>
because they deal with hardware-dependent information.</para>
<para>System-V style init scripts are employed in this book because they are <itemizedlist>
widely used and relatively simple. For additional options, a hint detailing <listitem><para>0 &mdash; halt</para></listitem>
the BSD style init setup is available at <ulink <listitem><para>1 &mdash; Single user mode</para></listitem>
url="&hints-root;bsd-init.txt"/>. Searching the LFS mailing lists for <listitem><para>2 &mdash; Multiuser, without networking</para></listitem>
<quote>depinit</quote>, <quote>upstart</quote>, or <quote>systemd</quote> <listitem><para>3 &mdash; Full multiuser mode</para></listitem>
will also offer additional information.</para> <listitem><para>4 &mdash; User definable</para></listitem>
<listitem><para>5 &mdash; Full multiuser mode with display manager</para></listitem>
<listitem><para>6 &mdash; reboot</para></listitem>
</itemizedlist>
<para>If using an alternative style of init scripts, skip these sections.</para> <para>The usual default run level is 3 or 5.</para>
<para>A listing of the boot scripts are found in <xref linkend="scripts" <bridgehead renderas="sect3">Advantages</bridgehead>
role="."/>.</para>
<itemizedlist>
<listitem>
<para>Established, well understood system.</para>
</listitem>
<listitem>
<para>Easy to customize.</para>
</listitem>
</itemizedlist>
<itemizedlist> <bridgehead renderas="sect3">Disadvantages</bridgehead>
<listitem>
<para><xref linkend="ch-scripts-bootscripts" role="."/></para>
</listitem>
<listitem>
<para><xref linkend="ch-scripts-usage" role="."/></para>
</listitem>
<listitem>
<para><xref linkend="ch-scripts-hostname" role="."/></para>
</listitem>
<listitem>
<para><xref linkend="ch-scripts-setclock" role="."/></para>
</listitem>
<listitem>
<para><xref linkend="ch-scripts-console" role="."/></para>
</listitem>
<listitem>
<para><xref linkend="ch-scripts-sysklogd" role="."/></para>
</listitem>
</itemizedlist>
<itemizedlist>
<listitem>
<para>Slower to boot. A medium speed base LFS system
takes 8-12 seconds where the boot time is measured from the
first kernel message to the login prompt. Network
connectivity is typically established about 2 seconds
after the login prompt.</para>
</listitem>
<para>Finally, there is a brief introduction to the scripts and configuration <listitem>
files used when the user logs into the system.</para> <para>Serial processing of boot tasks. This is related to the previous
point. A delay in any process such as a file system check, will
delay the entire boot process.</para>
</listitem>
<itemizedlist> <listitem>
<listitem> <para>Does not directly support advanced features like
<para><xref linkend="ch-scripts-profile" role="."/></para> control groups (cgroups), and per-user fair share scheduling.</para>
</listitem> </listitem>
<listitem>
<para><xref linkend="ch-scripts-inputrc" role="."/></para>
</listitem>
</itemizedlist>
<listitem>
<para>Adding scripts requires manual, static sequencing decisions.</para>
</listitem>
</itemizedlist>
</sect2>
<sect2 id='sysd-desc'>
<title>Systemd</title>
<para>Systemd is a group of interconnected programs that handles system and
individual process requests. It provides a dependency system between
various entities called "units". It automatically addresses dependencies
between units and can execute several startup tasks in parallel. It
provides login, inetd, logging, time, and networking services. </para>
<bridgehead renderas="sect3">Advantages</bridgehead>
<itemizedlist>
<listitem>
<para>Used on many established distributions by default.</para>
</listitem>
<listitem>
<para>There is extensive documentation.
See <ulink url="http://www.freedesktop.org/wiki/Software/systemd/"/>.</para>
</listitem>
<listitem>
<para>Parallel execution of boot processes. A medium speed
base LFS system takes 6-10 seconds from kernel start to a
login prompt. Network connectivity is typically established
about 2 seconds after the login prompt. More complex startup
procedures may show a greater speedup when compared to System V.</para>
</listitem>
<listitem>
<para>Implements advanced features such as control groups to
manage related processes.</para>
</listitem>
<listitem>
<para>Maintains backward compatibility with System V programs
and scripts.</para>
</listitem>
</itemizedlist>
<bridgehead renderas="sect3">Disadvantages</bridgehead>
<itemizedlist>
<listitem>
<para>There is a substantial learning curve.</para>
</listitem>
<listitem>
<para>Some advanced features such as dbus or cgroups cannot be
disabled if they are not otherwise needed.</para>
</listitem>
<listitem>
<para>Although implemented as several executable programs
the user cannot choose to implement only the portions desired.</para>
</listitem>
<listitem>
<para>Due to the nature of using compiled programs, systemd is
more difficult to debug.</para>
</listitem>
<listitem>
<para>Logging is done in a binary format. Extra tools must
be used to process logs or additional processes must be implemented
to duplicate traditional logging programs.</para>
</listitem>
</itemizedlist>
</sect2>
<sect2 id='sysv'>
<title>Selecting a Boot Method</title>
<para>Selecting a boot method in LFS is relatively easy.
Both systems are installed side-by-side. The only task needed is to
ensure the files that are needed by the system have the correct names.
The following scripts do that.</para>
<screen><userinput remap="install">cat &gt; /usr/local/sbin/set-systemd &lt;&lt; "EOF"
#! /bin/bash
ln -svfn init-systemd /sbin/init
ln -svfn init.d-systemd /etc/init.d
for tool in halt poweroff reboot runlevel shutdown telinit; do
ln -sfvn $(tool}-systemd /sbin/${tool}
ln -svfn ${tool}-systemd.8 /usr/share/man/man8/${tool}.8
done
echo "Now reboot with /sbin/reboot-sysv"
EOF
chmod 0744 /usr/local/sbin/set-systemd
cat &gt; /usr/local/sbin/set-sysv &lt;&lt; "EOF"
ln -sfvn init-sysv /sbin/init
ln -svfn init.d-sysv /etc/init.d
for tool in halt poweroff reboot runlevel shutdown telinit; do
ln -sfvn ${tool}-sysv /sbin/${tool}
ln -svfn ${tool}-sysv.8 /usr/share/man/man8/${tool}.8
done
echo "Now reboot with /sbin/reboot-systemd"
EOF
chmod 0744 /usr/local/sbin/set-sysv</userinput></screen>
<para>Now set the desired boot system. The default is System V:</para>
<screen><userinput remap="install">/usr/local/sbin/set-sysv</userinput></screen>
<para>Changing the boot system can be done at any time by running the
appropriate script above and rebooting.</para>
</sect2>
</sect1> </sect1>

View File

@ -42,8 +42,12 @@
avoid this, Udev comes with a script and some rules to assign stable names avoid this, Udev comes with a script and some rules to assign stable names
to network cards based on their MAC address.</para> to network cards based on their MAC address.</para>
<para>The rules were pre-generated in the build instructions for <para>If using the traditional network interface names such as eth0 is desired,
<application>udev (systemd)</application> in the last chapter. Inspect the generate a custom Udev rule:</para>
<screen><userinput>bash /lib/udev/init-net-rules.sh</userinput></screen>
<para> Now, inspect the
<filename>/etc/udev/rules.d/70-persistent-net.rules</filename> file, to <filename>/etc/udev/rules.d/70-persistent-net.rules</filename> file, to
find out which name was assigned to which network device:</para> find out which name was assigned to which network device:</para>
@ -122,11 +126,20 @@
depends on the files in <filename depends on the files in <filename
class="directory">/etc/sysconfig/</filename>. This directory should class="directory">/etc/sysconfig/</filename>. This directory should
contain a file for each interface to be configured, such as contain a file for each interface to be configured, such as
<filename>ifconfig.xyz</filename>, where <quote>xyz</quote> is <filename>ifconfig.xyz</filename>, where <quote>xyz</quote> is required to
meaningful to the administrator such as the device name (e.g. eth0). be a Network Card Interface name (e.g. eth0). Inside this file are
Inside this file are attributes to this interface, such as its IP attributes to this interface, such as its IP address(es), subnet masks, and
address(es), subnet masks, and so forth. It is necessary that so forth. It is necessary that the stem of the filename be
the stem of the filename be <emphasis>ifconfig</emphasis>.</para> <emphasis>ifconfig</emphasis>.</para>
<note><para>If the procedure in the previous section was not used, Udev
will assign network card interface names based on system physical
characteristics such as enp2s1. If you are not sure what your interface
name is, you can always run <command>ip link</command> after you have
booted your system. Again, it is important that ifconfig.xyz is named
after correct network card interface name (e.g. ifconfig.enp2s1 or
ifconfig.eth0) or your network interface will not be initialized during
the boot process.</para></note>
<para>The following command creates a sample file for the <para>The following command creates a sample file for the
<emphasis>eth0</emphasis> device with a static IP address:</para> <emphasis>eth0</emphasis> device with a static IP address:</para>
@ -136,8 +149,8 @@ cat &gt; ifconfig.eth0 &lt;&lt; "EOF"
<literal>ONBOOT=yes <literal>ONBOOT=yes
IFACE=eth0 IFACE=eth0
SERVICE=ipv4-static SERVICE=ipv4-static
IP=192.168.1.1 IP=192.168.1.2
GATEWAY=192.168.1.2 GATEWAY=192.168.1.1
PREFIX=24 PREFIX=24
BROADCAST=192.168.1.255</literal> BROADCAST=192.168.1.255</literal>
EOF</userinput></screen> EOF</userinput></screen>
@ -146,7 +159,7 @@ EOF</userinput></screen>
the proper setup.</para> the proper setup.</para>
<para>If the <envar>ONBOOT</envar> variable is set to <quote>yes</quote> the <para>If the <envar>ONBOOT</envar> variable is set to <quote>yes</quote> the
network script will bring up the Network Interface Card (NIC) during System V network script will bring up the Network Interface Card (NIC) during
booting of the system. If set to anything but <quote>yes</quote> the NIC booting of the system. If set to anything but <quote>yes</quote> the NIC
will be ignored by the network script and not be automatically brought up. will be ignored by the network script and not be automatically brought up.
The interface can be manually started or stopped with the The interface can be manually started or stopped with the
@ -181,6 +194,34 @@ EOF</userinput></screen>
</sect2> </sect2>
<sect2 id="systemd-net-enable">
<title>Configuring the Network Interface Card at boot (systemd)</title>
<para>Enabling of the network interface card configuration
in systemd is done per interface. To enable network interface card
configuration at boot, run:</para>
<screen><userinput>systemctl enable ifupdown@eth0</userinput></screen>
<para>To disable a previously enabled network interface
card configuration at boot, run:</para>
<screen><userinput>systemctl disable ifupdown@eth0</userinput></screen>
<para>To manually start the network interface card configuration,
run:</para>
<screen><userinput>systemctl start ifupdown@eth0</userinput></screen>
<para>Replace eth0 with the correct network interface card
name as described on the beginning of this page.</para>
<note><para>The network card can also be started or stopped
with the traditional <command>ifup &lt;device&gt;</command> or
<command>ifdown &lt;device&gt;</command> commands.</para></note>
</sect2>
<sect2 id="resolv.conf"> <sect2 id="resolv.conf">
<title>Creating the /etc/resolv.conf File</title> <title>Creating the /etc/resolv.conf File</title>

View File

@ -5,46 +5,53 @@
%general-entities; %general-entities;
]> ]>
<sect1 id="ch-scripts-setclock"> <sect1 id="ch-scripts-clock">
<?dbhtml filename="setclock.html"?> <?dbhtml filename="clock.html"?>
<title>Configuring the setclock Script</title> <title>Configuring the System Clock</title>
<indexterm zone="ch-scripts-setclock"> <para>Procedures for setting the system clock differ between systemd and
<primary sortas="d-setclock">setclock</primary> System V, however the separate procedures do not conflict so both
<secondary>configuring</secondary></indexterm> procedures should be accomplished to allow switching between systems.</para>
<para>The <command>setclock</command> script reads the time from the hardware <sect2 id="ch-scripts-setclock">
clock, also known as the BIOS or the Complementary Metal Oxide Semiconductor <title>System V Clock Configuration</title>
(CMOS) clock. If the hardware clock is set to UTC, this script will convert the
hardware clock's time to the local time using the
<filename>/etc/localtime</filename> file (which tells the
<command>hwclock</command> program which timezone the user is in). There is no
way to detect whether or not the hardware clock is set to UTC, so this
needs to be configured manually.</para>
<para>The <command>setclock</command> is run via <indexterm zone="ch-scripts-setclock">
<application>udev</application> when the kernel detects the hardware <primary sortas="d-setclock">setclock</primary>
capability upon boot. It can also be run manually with the stop parameter to <secondary>configuring</secondary></indexterm>
store the system time to the CMOS clock.</para>
<para>If you cannot remember whether or not the hardware clock is set to UTC, <para>The <command>setclock</command> script reads the time from the hardware
find out by running the <userinput>hwclock --localtime --show</userinput> clock, also known as the BIOS or the Complementary Metal Oxide Semiconductor
command. This will display what the current time is according to the hardware (CMOS) clock. If the hardware clock is set to UTC, this script will convert the
clock. If this time matches whatever your watch says, then the hardware clock is hardware clock's time to the local time using the
set to local time. If the output from <command>hwclock</command> is not local <filename>/etc/localtime</filename> file (which tells the
time, chances are it is set to UTC time. Verify this by adding or subtracting <command>hwclock</command> program which timezone the user is in). There is no
the proper amount of hours for the timezone to the time shown by way to detect whether or not the hardware clock is set to UTC, so this
<command>hwclock</command>. For example, if you are currently in the MST needs to be configured manually.</para>
timezone, which is also known as GMT -0700, add seven hours to the local
time.</para>
<para>Change the value of the <envar>UTC</envar> variable below <para>The <command>setclock</command> is run via
to a value of <parameter>0</parameter> (zero) if the hardware clock <application>udev</application> when the kernel detects the hardware
is <emphasis>not</emphasis> set to UTC time.</para> capability upon boot. It can also be run manually with the stop parameter to
store the system time to the CMOS clock.</para>
<para>Create a new file <filename>/etc/sysconfig/clock</filename> by running <para>If you cannot remember whether or not the hardware clock is set to UTC,
the following:</para> find out by running the <userinput>hwclock --localtime --show</userinput>
command. This will display what the current time is according to the hardware
clock. If this time matches whatever your watch says, then the hardware clock is
set to local time. If the output from <command>hwclock</command> is not local
time, chances are it is set to UTC time. Verify this by adding or subtracting
the proper amount of hours for the timezone to the time shown by
<command>hwclock</command>. For example, if you are currently in the MST
timezone, which is also known as GMT -0700, add seven hours to the local
time.</para>
<para>Change the value of the <envar>UTC</envar> variable below
to a value of <parameter>0</parameter> (zero) if the hardware clock
is <emphasis>not</emphasis> set to UTC time.</para>
<para>Create a new file <filename>/etc/sysconfig/clock</filename> by running
the following:</para>
<screen><userinput>cat &gt; /etc/sysconfig/clock &lt;&lt; "EOF" <screen><userinput>cat &gt; /etc/sysconfig/clock &lt;&lt; "EOF"
<literal># Begin /etc/sysconfig/clock <literal># Begin /etc/sysconfig/clock
@ -58,11 +65,68 @@ CLOCKPARAMS=
# End /etc/sysconfig/clock</literal> # End /etc/sysconfig/clock</literal>
EOF</userinput></screen> EOF</userinput></screen>
<para>A good hint explaining how to deal with time on LFS is available <para>A good hint explaining how to deal with time on LFS is available
at <ulink url="&hints-root;time.txt"/>. It explains issues such as at <ulink url="&hints-root;time.txt"/>. It explains issues such as
time zones, UTC, and the <envar>TZ</envar> environment variable.</para> time zones, UTC, and the <envar>TZ</envar> environment variable.</para>
<note><para>The CLOCKPARAMS and UTC paramaters may be alternatively set <note><para>The CLOCKPARAMS and UTC paramaters may be alternatively set
in the <filename>/etc/sysconfig/rc.site</filename> file.</para></note> in the <filename>/etc/sysconfig/rc.site</filename> file.</para></note>
</sect2>
<sect2 id="ch-scripts-systemd-clock">
<title>Systemd Clock Configuration</title>
<indexterm zone="ch-scripts-clock">
<primary sortas="d-clock">clock</primary>
<secondary>configuring</secondary></indexterm>
<para>This section discusses how to configure the
<command>systemd-timedated</command> system service, which configures
system clock and timezone.</para>
<para><command>systemd-timedated</command> reads
<filename>/etc/adjtime</filename>, and depending on the contents of the file,
it sets the clock to either UTC or local time. Create the
<filename>/etc/adjtime</filename> file with the following contents <emphasis>if your
hardware clock is set to local time</emphasis>:</para>
<screen role="nodump"><userinput>cat &gt; /etc/adjtime &lt;&lt; "EOF"
<literal>0.0 0 0.0
0
LOCAL</literal>
EOF</userinput></screen>
<para>If <filename>/etc/adjtime</filename> isn't present at first boot,
<command>systemd-timedated</command> will assume that hardware clock is
set to UTC and create the file using that setting.</para>
<para>You can also use the <command>timedatectl</command> utility to tell
<command>systemd-timedated</command> if your hardware clock is set to
UTC or local time:</para>
<screen role="nodump"><userinput>timedatectl set-local-rtc 1</userinput></screen>
<para><command>timedatectl</command> can also be used to change system time and
time zone.</para>
<para>To change your current system time, issue:</para>
<screen role="nodump"><userinput>timedatectl set-time YYYY:MM:DD HH:MM:SS</userinput></screen>
<para>Hardware clock will also be updated accordingly.</para>
<para>To change your current time zone, issue:</para>
<screen role="nodump"><userinput>timedatectl set-timezone TIMEZONE</userinput></screen>
<para>You can get list of available time zones by running:</para>
<screen role="nodump"><userinput>timedatectl list-timezones</userinput></screen>
<note><para>Please note that <command>timedatectl</command> command can
be used only on a system booted with Systemd.</para></note>
</sect2>
</sect1> </sect1>

View File

@ -16,8 +16,8 @@
</indexterm> </indexterm>
<para>The optional <filename>/etc/sysconfig/rc.site</filename> file contains <para>The optional <filename>/etc/sysconfig/rc.site</filename> file contains
settings that are automatically set for each boot script. It can alternatively settings that are automatically set for each SystemV boot script. It can
set the values specified in the <filename>hostname</filename>, alternatively set the values specified in the <filename>hostname</filename>,
<filename>console</filename>, and <filename>clock</filename> files in the <filename>console</filename>, and <filename>clock</filename> files in the
<filename class='directory'>/etc/sysconfig/</filename> directory. If the <filename class='directory'>/etc/sysconfig/</filename> directory. If the
associated variables are present in both these separate files and associated variables are present in both these separate files and

View File

@ -16,8 +16,8 @@
</indexterm> </indexterm>
<para>The <filename>sysklogd</filename> script invokes the <para>The <filename>sysklogd</filename> script invokes the
<command>syslogd</command> program with the <parameter>-m 0</parameter> <command>syslogd</command> program as a part of System V initialization. The
option. This option turns off the periodic timestamp mark that <parameter>-m 0</parameter> option turns off the periodic timestamp mark that
<command>syslogd</command> writes to the log files every 20 minutes by <command>syslogd</command> writes to the log files every 20 minutes by
default. If you want to turn on this periodic timestamp mark, edit default. If you want to turn on this periodic timestamp mark, edit
<filename>/etc/sysconfig/rc.site</filename> and define the variable <filename>/etc/sysconfig/rc.site</filename> and define the variable

View File

@ -8,7 +8,7 @@
<sect1 id="ch-scripts-usage"> <sect1 id="ch-scripts-usage">
<?dbhtml filename="usage.html"?> <?dbhtml filename="usage.html"?>
<title>How Do These Bootscripts Work?</title> <title>How Do the System V Bootscripts Work?</title>
<indexterm zone="ch-scripts-usage"> <indexterm zone="ch-scripts-usage">
<primary sortas="a-Bootscripts">Bootscripts</primary> <primary sortas="a-Bootscripts">Bootscripts</primary>

View File

@ -70,12 +70,27 @@
configuration to a good state that takes your current system architecture configuration to a good state that takes your current system architecture
into account.</para> into account.</para>
<para>Due to recent changes in <application>udev</application>, be sure to <para>Be sure to enable or disable following features:</para>
select:</para>
<screen role="nodump">Device Drivers ---&gt; <screen role="nodump">General setup ---&gt;
[*] open by fhandle syscalls
[*] Control Group support
Processor type and features ---&gt;
[*] Enable seccomp to safely compute untrusted bytecode
Networking support ---&gt;
Networking options ---&gt;
&lt;*&gt; The IPv6 protocol
Device Drivers ---&gt;
Generic Driver Options ---&gt; Generic Driver Options ---&gt;
Maintain a devtmpfs filesystem to mount at /dev</screen></note> () path to uevent helper
[*] Maintain a devtmpfs filesystem to mount at /dev
[ ] Fallback user-helper invocation for firmware loading
File systems ---&gt;
[*] Inotify support for userspace
&lt;*&gt; Kernel automounter version 4 support (also supports v3)
Pseudo filesystems ---&gt;
[*] Tmpfs POSIX Access Control Lists
[*] Tmpfs extended attributes</screen></note>
<screen role="nodump"><userinput>make LANG=<replaceable>&lt;host_LANG_value&gt;</replaceable> LC_ALL= menuconfig</userinput></screen> <screen role="nodump"><userinput>make LANG=<replaceable>&lt;host_LANG_value&gt;</replaceable> LC_ALL= menuconfig</userinput></screen>

View File

@ -1,7 +1,7 @@
<!ENTITY version "SVN-20140331"> <!ENTITY version "SVN-20140403">
<!ENTITY releasedate "March 31, 2014"> <!ENTITY releasedate "April 3, 2014">
<!ENTITY copyrightdate "1999-2014"><!-- jhalfs needs a literal dash, not &ndash; --> <!ENTITY copyrightdate "1999-2014"><!-- jhalfs needs a literal dash, not &ndash; -->
<!ENTITY milestone "7.6"> <!ENTITY milestone "8.0">
<!ENTITY generic-version "development"> <!-- Use "development", "testing", or "x.y[-pre{x}]" --> <!ENTITY generic-version "development"> <!-- Use "development", "testing", or "x.y[-pre{x}]" -->
<!ENTITY lfs-root "http://www.linuxfromscratch.org/"> <!ENTITY lfs-root "http://www.linuxfromscratch.org/">

View File

@ -128,6 +128,14 @@
<!ENTITY diffutils-ch6-du "25 MB"> <!ENTITY diffutils-ch6-du "25 MB">
<!ENTITY diffutils-ch6-sbu "0.5 SBU"> <!ENTITY diffutils-ch6-sbu "0.5 SBU">
<!ENTITY dbus-version "1.8.0">
<!ENTITY dbus-size "1,820 KB">
<!ENTITY dbus-url "http://dbus.freedesktop.org/releases/dbus/dbus-&dbus-version;.tar.gz">
<!ENTITY dbus-md5 "059fbe84e39fc99c67a14f15b1f39dff">
<!ENTITY dbus-home "http://www.freedesktop.org/wiki/Software/dbus">
<!ENTITY dbus-ch6-du "35 MB">
<!ENTITY dbus-ch6-sbu "less than 0.4 SBU">
<!-- NOTE: When updating e2fsprogs, remember to check the list <!-- NOTE: When updating e2fsprogs, remember to check the list
of acceptable features that can be shown by debugfs in of acceptable features that can be shown by debugfs in
chapter02/creatingfilesystem.xml --> chapter02/creatingfilesystem.xml -->
@ -362,7 +370,7 @@
<!ENTITY less-ch6-du "3.6 MB"> <!ENTITY less-ch6-du "3.6 MB">
<!ENTITY less-ch6-sbu "less than 0.1 SBU"> <!ENTITY less-ch6-sbu "less than 0.1 SBU">
<!ENTITY lfs-bootscripts-version "20140321"> <!-- Scripts depend on this format --> <!ENTITY lfs-bootscripts-version "20140331"> <!-- Scripts depend on this format -->
<!ENTITY lfs-bootscripts-size "BOOTSCRIPTS-SIZE KB"> <!-- Updated in Makefile --> <!ENTITY lfs-bootscripts-size "BOOTSCRIPTS-SIZE KB"> <!-- Updated in Makefile -->
<!ENTITY lfs-bootscripts-url "&downloads-root;lfs-bootscripts-&lfs-bootscripts-version;.tar.bz2"> <!ENTITY lfs-bootscripts-url "&downloads-root;lfs-bootscripts-&lfs-bootscripts-version;.tar.bz2">
<!ENTITY lfs-bootscripts-md5 "BOOTSCRIPTS-MD5SUM"> <!-- Updated in Makefile --> <!ENTITY lfs-bootscripts-md5 "BOOTSCRIPTS-MD5SUM"> <!-- Updated in Makefile -->
@ -598,13 +606,13 @@
<!ENTITY texinfo-ch6-du "101 MB"> <!ENTITY texinfo-ch6-du "101 MB">
<!ENTITY texinfo-ch6-sbu "0.6 SBU"> <!ENTITY texinfo-ch6-sbu "0.6 SBU">
<!ENTITY systemd-version "208"> <!ENTITY systemd-version "211">
<!ENTITY systemd-size "2,328 KB"> <!ENTITY systemd-size "2,604 KB">
<!ENTITY systemd-url "http://www.freedesktop.org/software/systemd/systemd-&systemd-version;.tar.xz"> <!ENTITY systemd-url "http://www.freedesktop.org/software/systemd/systemd-&systemd-version;.tar.xz">
<!ENTITY systemd-md5 "df64550d92afbffb4f67a434193ee165"> <!ENTITY systemd-md5 "0a70c382b6089526f98073b4ee85ef75">
<!ENTITY systemd-home "http://www.freedesktop.org/wiki/Software/systemd/"> <!ENTITY systemd-home "http://www.freedesktop.org/wiki/Software/systemd/">
<!ENTITY systemd-ch6-du "29 MB"> <!ENTITY systemd-ch6-du "410 MB">
<!ENTITY systemd-ch6-sbu "0.1 SBU"> <!ENTITY systemd-ch6-sbu "4.5 SBU">
<!ENTITY tzdata-version "2014a"> <!ENTITY tzdata-version "2014a">
<!ENTITY tzdata-size "215 KB"> <!ENTITY tzdata-size "215 KB">
@ -614,11 +622,11 @@
<!ENTITY tzdata-ch6-du "6.4 MB"> <!ENTITY tzdata-ch6-du "6.4 MB">
<!ENTITY tzdata-ch6-sbu "less than 0.1 SBU"> <!ENTITY tzdata-ch6-sbu "less than 0.1 SBU">
<!ENTITY udev-lfs "udev-lfs-&systemd-version;-3"> <!ENTITY udev-lfs-version "udev-lfs-20140302">
<!ENTITY udev-lfs-size "29 KB"> <!ENTITY udev-lfs-size "11 KB">
<!ENTITY udev-lfs-url "&anduin-other;&udev-lfs;.tar.bz2"> <!ENTITY udev-lfs-url "&anduin-other;&udev-lfs-version;.tar.bz2">
<!ENTITY udev-lfs-md5 "c0231ff619e567a9b11f912d8a7a404a"> <!ENTITY udev-lfs-md5 "81fd93e43e2c232932f38223ba2b740c">
<!ENTITY udev-lfs-home " "> <!ENTITY udev-lfs-home " ">
<!ENTITY util-linux-version "2.24.1"> <!ENTITY util-linux-version "2.24.1">
<!ENTITY util-linux-size "3,461 KB"> <!ENTITY util-linux-size "3,461 KB">

View File

@ -26,6 +26,10 @@
<!ENTITY sysvinit-consolidated-patch-md5 "0b7b5ea568a878fdcc4057b2bf36e5cb"> <!ENTITY sysvinit-consolidated-patch-md5 "0b7b5ea568a878fdcc4057b2bf36e5cb">
<!ENTITY sysvinit-consolidated-patch-size "3.9 KB"> <!ENTITY sysvinit-consolidated-patch-size "3.9 KB">
<!ENTITY systemd-compat-patch "systemd-&systemd-version;-compat-1.patch">
<!ENTITY systemd-compat-patch-md5 "0edc54bbe9391cfb072bc737312e6b7a">
<!ENTITY systemd-compat-patch-size "12 KB">
<!ENTITY tar-manpage-patch "tar-&tar-version;-manpage-1.patch"> <!ENTITY tar-manpage-patch "tar-&tar-version;-manpage-1.patch">
<!ENTITY tar-manpage-patch-md5 "321f85ec32733b1a9399e788714a5156"> <!ENTITY tar-manpage-patch-md5 "321f85ec32733b1a9399e788714a5156">
<!ENTITY tar-manpage-patch-size "7.8 KB"> <!ENTITY tar-manpage-patch-size "7.8 KB">

View File

@ -1,3 +1,6 @@
2014-03-02 <bdubbs@linuxfromscratch.org>
* Makefile.lfs: Remove build procedures leaving only LFS rules
2014-02-16 <bdubbs@linuxfromscratch.org> 2014-02-16 <bdubbs@linuxfromscratch.org>
* Makefile.lfs: Adjust warning flags. Adjust linking rules to * Makefile.lfs: Adjust warning flags. Adjust linking rules to
allow build with util-linux in LFS's /tools directory. allow build with util-linux in LFS's /tools directory.

View File

@ -1,11 +1,10 @@
# Custom systemd Makefile that builds/installs udev only for LFS # Custom systemd Makefile that installs udev rules for LFS
# Bruce Dubbs 2012-07-11 # Bruce Dubbs 2014-04-02
# vim: tabstop=3 # vim: tabstop=3
VERSION=20140302
SHELL=/bin/bash SHELL=/bin/bash
SYSTEMD_VERSION=208
VERSION=$(SYSTEMD_VERSION)-3
ifeq ($(V),) ifeq ($(V),)
VB = @ VB = @
@ -13,340 +12,19 @@ else
VB = VB =
endif endif
WARN = -Wall -W -Wextra -Wno-inline -Wvla -Wundef -Wformat=2 \ all:
-Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs \ @echo "Use the install target"
-Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self \
-Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes \
-Wstrict-prototypes -Wredundant-decls -Wmissing-declarations \
-Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align \
-Wstrict-aliasing=2 -Wwrite-strings -Wno-overlength-strings \
-Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-result \
-Werror=overflow -Wp,-D_FORTIFY_SOURCE=2 -Wno-long-long -Wno-vla
OPTIONS = -O2 -pipe -ffast-math -fno-common -fdiagnostics-show-option \ install:
-fno-strict-aliasing -ffunction-sections -fdata-sections -fPIC -std=gnu99 @mkdir -pv $(DESTDIR)/lib/udev/rules.d \
$(DESTDIR)/etc/udev/rules.d \
$(DESTDIR)/usr/share/doc/udev-$(VERSION)/lfs
OPTIONS2 := $(OPTIONS) -fvisibility=hidden # Copy rules
@cp -v udev-lfs-$(VERSION)/*.rules $(DESTDIR)/etc/udev/rules.d
LDFLAGS1 = -pthread -lrt -Wl,--as-needed -Wl,--gc-sections -Wl,--no-undefined @cp -v udev-lfs-$(VERSION)/*_rules $(DESTDIR)/lib/udev
LDFLAGS2 := $(LDFLAGS1) -L /tools/lib -lblkid -lkmod
DEF = -include cfg.h \
-DSYSCONFDIR=\"/etc\" \
-DFIRMWARE_PATH="\"/lib/firmware/updates/\", \"/lib/firmware/\"" \
-DHWDB_BIN=\"/etc/udev/hwdb.bin\" \
-DROOTPREFIX= \
-DUDEVLIBEXECDIR=\"/lib/udev\" \
-D_LARGEFILE_SOURCE \
-D_FILE_OFFSET_BITS=64 \
-DHAVE_FIRMWARE
INCLUDE = -I src/libudev -I src/shared -I src -I src/login -I src/systemd \
-I src/core -I udev-lfs-$(VERSION)
LIBUDEV_SRCS = libudev-device-private.c \
libudev-device.c \
libudev-enumerate.c \
libudev-hwdb.c \
libudev-list.c \
libudev-monitor.c \
libudev-queue-private.c \
libudev-queue.c \
libudev-util.c \
libudev.c \
test-device-nodes.c \
device-nodes.c
LIBUDEV_OBJS := $(addprefix build/, $(LIBUDEV_SRCS:.c=.o))
LIBUDEV = libudev
LIBUDEV_MAJOR = .1
LIBUDEV_MINOR = .3
LIBUDEV_PATCH = .2
LIBUDEV_SONAME := $(LIBUDEV).so
LIBUDEV_LINK_NAME := $(LIBUDEV_SONAME)$(LIBUDEV_MAJOR)
LIBUDEV_REAL_NAME := $(LIBUDEV_LINK_NAME)$(LIBUDEV_MINOR)$(LIBUDEV_PATCH)
COMMON_LIB = udev-local.a
COMMON_SRCS = log.c \
label.c \
mkdir.c \
cgroup-util.c \
strv.c \
strbuf.c \
path-util.c \
conf-files.c \
hashmap.c \
set.c \
exit-status.c \
util.c \
mkdir-label.c \
dev-setup.c \
sd-login.c \
sd-daemon.c \
time-util.c \
fileio.c \
strxcpyx.c \
env-util.c \
utf8.c
COMMON_OBJS := $(addprefix build/, $(COMMON_SRCS:.c=.o))
UDEVD_SRCS = udev-ctrl.c \
udev-rules.c \
udev-watch.c \
udev-event.c \
udev-node.c \
udev-builtin.c \
udev-builtin-blkid.c \
udev-builtin-firmware.c \
udev-builtin-keyboard.c \
udev-builtin-path_id.c \
udev-builtin-hwdb.c \
udev-builtin-kmod.c \
udev-builtin-uaccess.c \
udev-builtin-net_id.c \
udev-builtin-usb_id.c \
udev-builtin-input_id.c \
udev-builtin-btrfs.c
UDEVD_OBJS := $(addprefix build/, $(UDEVD_SRCS:.c=.o))
UDEV_ADMIN_SRCS = udevadm.c \
udevadm-test.c \
udevadm-monitor.c \
udevadm-settle.c \
udevadm-hwdb.c \
udevadm-info.c \
udevadm-test-builtin.c \
udevadm-trigger.c \
udevadm-control.c \
udev-rules.c \
udev-ctrl.c \
udev-event.c \
udev-node.c \
udev-watch.c \
udev-builtin.c \
udev-builtin-blkid.c \
udev-builtin-keyboard.c \
udev-builtin-firmware.c \
udev-builtin-path_id.c \
udev-builtin-hwdb.c \
udev-builtin-kmod.c \
udev-builtin-uaccess.c \
udev-builtin-net_id.c \
udev-builtin-usb_id.c \
udev-builtin-input_id.c \
udev-builtin-btrfs.c
UDEV_ADMIN_OBJS := $(addprefix build/, $(UDEV_ADMIN_SRCS:.c=.o))
LFS_RULES = 55-lfs.rules
VPATH = src/login src/udev src/udev/accelerometer \
src/udev/scsi_id src/udev/cdrom_id src/udev/v4l_id \
src/udev/mtd_probe src/udev/collect src/udev/ata_id \
src/libudev src/test src/libsystemd-daemon
SED_PROCESS = \
sed -e 's|@VERSION@|$(SYSTEMD_VERSION)|g' \
-e 's|@prefix@|/usr|g' \
-e 's|@udevlibexecdir@|/lib/udev|g' \
-e 's|@libdir@|/usr/lib|g' \
-e 's|@includedir@|/usr/include|g' \
< $< > $@
SECURE = $(shell if objdump -T /lib/libc.so.6 | grep -q " secure_getenv"; \
then echo yes; fi)
ifeq "$(SECURE)" "yes"
SECURE_GETENV = SECURE_GETENV
else
SECURE_GETENV = __SECURE_GETENV
endif
udev: common \
build/$(COMMON_LIB) \
build/$(LIBUDEV_REAL_NAME) \
build/udevd \
build/udevadm \
build/accelerometer \
build/ata_id \
build/cdrom_id \
build/scsi_id \
build/v4l_id \
build/mtd_probe \
build/collect \
build/udev.pc \
build/libudev.pc
cfg.h: udev-lfs-$(VERSION)/cfg.h
sed -e 's/LFS-VERSION/$(SYSTEMD_VERSION)/' \
-e 's/SECURE_GETENV/$(SECURE_GETENV)/' \
udev-lfs-$(VERSION)/cfg.h > ./cfg.h
@mkdir -p build
common: cfg.h
@touch common
build/%o: %c common
@echo CC $<
$(VB)gcc -c $(WARN) $(OPTIONS2) $(INCLUDE) $(DEF) -o $@ $<
# Sources from src/libudev use -fvisibility=hidden
build/%o: src/libudev/%c common
@echo CC $<
$(VB)gcc -c $(WARN) $(OPTIONS) $(INCLUDE) $(DEF) -o $@ $<
# Sources from src/shared use -fvisibility=hidden
build/%o: src/shared/%c common
@echo CC $<
$(VB)gcc -c $(WARN) $(OPTIONS) $(INCLUDE) $(DEF) -o $@ $<
# Build the dynamic library
build/$(LIBUDEV_REAL_NAME): $(LIBUDEV_OBJS) build/$(COMMON_LIB)
@echo LINK $@
$(VB)gcc -shared -fPIC -DPIC \
$(LIBUDEV_OBJS) \
build/$(COMMON_LIB) \
-Wl,--no-whole-archive -ldl -lrt -O2 \
-Wl,--as-needed \
-Wl,--gc-sections \
-Wl,--no-undefined \
-Wl,-soname,$(LIBUDEV_LINK_NAME) \
-o build/$(LIBUDEV_REAL_NAME)
ln -sfn $(LIBUDEV_REAL_NAME) build/$(LIBUDEV_LINK_NAME)
ln -sfn $(LIBUDEV_REAL_NAME) build/$(LIBUDEV_SONAME)
#-Wl,--whole-archive \
#-Wl,--version-script=./src/libudev/libudev.sym \
# Build the static library for internal use
build/$(COMMON_LIB): $(COMMON_OBJS) $(LIBUDEV_OBJS) $(UDEVD_OBJS)
@echo AR $@
$(VB)ar rcs build/$(COMMON_LIB) $(COMMON_OBJS) $(LIBUDEV_OBJS)
build/udevd: build/$(COMMON_LIB) build/udevd.o
@echo LINK $@
$(VB)gcc build/udevd.o $(UDEVD_OBJS) -o $@ $(LDFLAGS2) \
build/udev-local.a build/$(COMMON_LIB)
$(VB)strip --strip-unneeded $@
build/udevadm: $(UDEV_ADMIN_OBJS) build/$(COMMON_LIB)
@echo LINK $@
$(VB)gcc $(UDEV_ADMIN_OBJS) -o $@ $(LDFLAGS2) build/$(COMMON_LIB)
$(VB)strip --strip-unneeded $@
build/accelerometer: build/accelerometer.o build/$(COMMON_LIB)
@echo LINK $@
$(VB)gcc build/accelerometer.o -o $@ \
build/udev-local.a build/$(COMMON_LIB) $(LDFLAGS1) -lm
$(VB)strip --strip-unneeded $@
build/scsi_id: build/scsi_id.o build/scsi_serial.o build/$(COMMON_LIB)
@echo LINK $@
$(VB)gcc build/scsi_id.o build/scsi_serial.o -o $@ \
build/udev-local.a build/$(COMMON_LIB) $(LDFLAGS1)
$(VB)strip --strip-unneeded $@
build/ata_id: build/ata_id.o build/$(COMMON_LIB)
@echo LINK $@
$(VB)gcc build/ata_id.o -o $@ build/udev-local.a build/$(COMMON_LIB) $(LDFLAGS1)
$(VB)strip --strip-unneeded $@
build/cdrom_id: build/cdrom_id.o build/$(COMMON_LIB)
@echo LINK $@
$(VB)gcc build/cdrom_id.o -o $@ build/udev-local.a build/$(COMMON_LIB) $(LDFLAGS1)
$(VB)strip --strip-unneeded $@
build/v4l_id: build/v4l_id.o build/$(COMMON_LIB)
@echo LINK $@
$(VB)gcc build/v4l_id.o -o $@ build/udev-local.a build/$(COMMON_LIB) $(LDFLAGS1)
$(VB)strip --strip-unneeded $@
build/mtd_probe: build/mtd_probe.o build/probe_smartmedia.o build/$(COMMON_LIB)
@echo LINK $@
$(VB)gcc build/mtd_probe.o build/probe_smartmedia.o -o $@ \
build/udev-local.a build/$(COMMON_LIB) $(LDFLAGS1)
$(VB)strip --strip-unneeded $@
build/collect: build/collect.o build/$(COMMON_LIB)
@echo LINK $@
$(VB)gcc build/collect.o -o $@ build/udev-local.a build/$(COMMON_LIB) $(LDFLAGS1)
$(VB)strip --strip-unneeded $@
build/%pc: %pc.in common
@echo GEN $@
@$(SED_PROCESS)
install: udev
@mkdir -pv $(DESTDIR)/lib/udev/devices/pts $(DESTDIR)/lib/udev/rules.d \
$(DESTDIR){,/usr}/lib/firmware $(DESTDIR)/sbin \
$(DESTDIR)/usr/lib/pkgconfig $(DESTDIR)/etc/udev/rules.d \
$(DESTDIR)/usr/share/man/man{7,8} $(DESTDIR)/usr/include \
$(DESTDIR)/usr/share/doc/udev-$(SYSTEMD_VERSION)/lfs \
$(DESTDIR)/usr/share/gtk-doc/html/libudev
# Copy executables
@cp -v build/udevadm $(DESTDIR)/sbin
@cp -v build/{udevd,accelerometer,ata_id,cdrom_id,collect,mtd_probe,scsi_id,v4l_id} \
$(DESTDIR)/lib/udev
@cp -v udev-lfs-$(VERSION)/write* $(DESTDIR)/lib/udev
@cp -v udev-lfs-$(VERSION)/*functions $(DESTDIR)/lib/udev
# Copy and set up library and associated files
@cp -v build/{lib,}udev.pc $(DESTDIR)/usr/lib/pkgconfig
@cp -v build/$(LIBUDEV_REAL_NAME) $(DESTDIR)/lib
ln -svfn ../../lib/$(LIBUDEV_REAL_NAME) $(DESTDIR)/usr/lib/$(LIBUDEV_SONAME)
ln -svfn $(LIBUDEV_REAL_NAME) $(DESTDIR)/lib/$(LIBUDEV_LINK_NAME)
# Copy the libudev header
@cp -v src/libudev/libudev.h $(DESTDIR)/usr/include
# Create null device and copy rules
@cp -v rules/* $(DESTDIR)/lib/udev/rules.d
@rm -v $(DESTDIR)/lib/udev/rules.d/99*
@cp -v udev-lfs-$(VERSION)/*.rules $(DESTDIR)/etc/udev/rules.d
# Set up hardware DB
@mkdir -pv $(DESTDIR)/lib/udev/hwdb.d
@cp hwdb/* $(DESTDIR)/lib/udev/hwdb.d
# @build/udevadm hwdb --update
# Copy documentation
@cp -v udev-lfs-$(VERSION)/udev.7 $(DESTDIR)/usr/share/man/man7
@cp -v udev-lfs-$(VERSION)/udevadm.8 $(DESTDIR)/usr/share/man/man8
@cp -v udev-lfs-$(VERSION)/udevd.8 $(DESTDIR)/usr/share/man/man8
@cp -v udev-lfs-$(VERSION)/README $(DESTDIR)/usr/share/doc/udev-$(SYSTEMD_VERSION)/lfs
@cp -v udev-lfs-$(VERSION)/*.txt $(DESTDIR)/usr/share/doc/udev-$(SYSTEMD_VERSION)/lfs
@cp -v docs/libudev/*.{txt,types} $(DESTDIR)/usr/share/doc/udev-$(SYSTEMD_VERSION)
@cp -v docs/libudev/html/* $(DESTDIR)/usr/share/gtk-doc/html/libudev
# Copy misc
@cp -v udev-lfs-$(VERSION)/init-net-rules.sh $(DESTDIR)/lib/udev @cp -v udev-lfs-$(VERSION)/init-net-rules.sh $(DESTDIR)/lib/udev
include udev-lfs-$(VERSION)/makefile-incl.gudev # Copy documentation
include udev-lfs-$(VERSION)/makefile-incl.gir @cp -v udev-lfs-$(VERSION)/README $(DESTDIR)/usr/share/doc/udev-$(VERSION)/lfs
include udev-lfs-$(VERSION)/makefile-incl.keymap @cp -v udev-lfs-$(VERSION)/*.txt $(DESTDIR)/usr/share/doc/udev-$(VERSION)/lfs
all : udev keymap gudev gir-data
install-all: install install-keymap install-gudev install-gir-data
clean:
rm -rf build
rm -f cfg.h
rm -f common
rm -f src/gudev/gudevmarshal.h
rm -f src/gudev/gudevmarshal.c
rm -f src/gudev/gudevenumtypes.h
rm -f src/gudev/gudevenumtypes.c
rm -f src/udev/keymap/keys.txt
rm -f src/udev/keymap/keys-from-name.gperf
rm -f src/udev/keymap/keys-from-name.h
rm -f src/udev/keymap/keys-to-name.h
.PHONY: clean

View File

@ -1,7 +1,7 @@
The udev-lfs set of files is a customization of systemd. The udev-lfs set of files is a customization of systemd.
In 2012, udev was merged with systemd and a build methodology In 2012, udev was merged with systemd and a build methodology
incompatible with LFS. These files extract the udev incompatible with LFS. These files add cusom udev rules
code from systemd for LFS. for LFS.
These files are distributed in the form of a tar file available These files are distributed in the form of a tar file available
from the LFS file mirrors. The tarball is created with: from the LFS file mirrors. The tarball is created with:
@ -10,13 +10,7 @@ mkdir /tmp/udev-lfs-$VERSION
cp -av * /tmp/udev-lfs-$VERSION cp -av * /tmp/udev-lfs-$VERSION
tar -jcf /tmp/udev-lfs-$VERSION.tar.bz2 -C /tmp udev-lfs-$VERSION tar -jcf /tmp/udev-lfs-$VERSION.tar.bz2 -C /tmp udev-lfs-$VERSION
Makefile.lfs - The main LFS Makefile. Builds and installs Makefile.lfs - The LFS Makefile. Installs udev rules for LFS.
udev from systemd sources.
makefile-incl.keymap - BLFS makefile for keymap and supporting files
makefile-incl.gudev - BLFS makefile for libgudev
makefile-incl.gir - BLFS makefile for GObject files
contrib - Useful rules from debian contrib - Useful rules from debian
contrib/debian contrib/debian
@ -31,8 +25,6 @@ rule_generator.functions
55-lfs.txt - Documentation for LFS installed rules 55-lfs.txt - Documentation for LFS installed rules
cfg.h - Basic info needed for udev compilation
ChangeLog - Log of changes to 55-lfs-rules ChangeLog - Log of changes to 55-lfs-rules
init-net-rules.sh - A script for establishing persistent network init-net-rules.sh - A script for establishing persistent network

View File

@ -1,64 +0,0 @@
/* Custom udev (from systemd) configuration header file for LFS */
/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define if kmod is available */
#define HAVE_KMOD 1
/* Define if blkid is available */
#define HAVE_BLKID 1
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the `secure_getenv' function. */
/* For glibc before 2.17, this should be HAVE___SECURE_GETENV */
#define HAVE_SECURE_GETENV 1
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the declaration of `name_to_handle_at', and to 0 if
* you don't. */
#define HAVE_DECL_NAME_TO_HANDLE_AT 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define if XZ is available */
#define HAVE_XZ 1
/* Name of package */
#define PACKAGE "udev"
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Enable GNU extensions on systems that have them. */
# define _GNU_SOURCE 1
/* Version number of package */
#define VERSION "LFS-VERSION"
#define HAVE_DECL_PIVOT_ROOT 0
#define HAVE_DECL_GETTID 0
#define HAVE_NAME_TO_HANDLE_AT 1

View File

@ -1,923 +0,0 @@
/* ANSI-C code produced by gperf version 3.0.4 */
/* Command-line: gperf -L ANSI-C -t -N keyboard_lookup_key -H hash_key_name -p -C */
/* Computed positions: -k'1-4,$' */
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
&& ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
&& (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
&& ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
&& ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
&& ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
&& ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \
&& ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \
&& ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \
&& ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \
&& ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \
&& ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \
&& ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \
&& ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \
&& ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \
&& ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \
&& ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \
&& ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \
&& ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \
&& ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \
&& ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \
&& ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
&& ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
/* The character set is not based on ISO-646. */
#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
#endif
struct key { const char* name; unsigned short id; };
#define TOTAL_KEYWORDS 392
#define MIN_WORD_LENGTH 1
#define MAX_WORD_LENGTH 16
#define MIN_HASH_VALUE 1
#define MAX_HASH_VALUE 1503
/* maximum key range = 1503, duplicates = 0 */
#ifdef __GNUC__
__inline
#else
#ifdef __cplusplus
inline
#endif
#endif
static unsigned int
hash_key_name (register const char *str, register unsigned int len)
{
static const unsigned short asso_values[] =
{
1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504,
1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504,
1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504,
1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504,
1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504, 130, 165,
295, 285, 310, 370, 335, 220, 215, 75, 1504, 1504,
1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504,
1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504,
1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504,
1504, 1504, 1504, 1504, 1504, 75, 1504, 10, 330, 25,
80, 5, 395, 260, 345, 185, 50, 300, 110, 30,
145, 35, 15, 45, 65, 20, 0, 210, 455, 375,
55, 95, 85, 1504, 1504, 1504, 1504, 1504, 1504, 1504,
1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504,
1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504,
1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504,
1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504,
1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504,
1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504,
1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504,
1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504,
1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504,
1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504,
1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504,
1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504, 1504,
1504, 1504, 1504, 1504, 1504, 1504
};
register int hval = len;
switch (hval)
{
default:
hval += asso_values[(unsigned char)str[3]];
/*FALLTHROUGH*/
case 3:
hval += asso_values[(unsigned char)str[2]];
/*FALLTHROUGH*/
case 2:
hval += asso_values[(unsigned char)str[1]];
/*FALLTHROUGH*/
case 1:
hval += asso_values[(unsigned char)str[0]];
break;
}
return hval + asso_values[(unsigned char)str[len - 1]];
}
#ifdef __GNUC__
__inline
#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
__attribute__ ((__gnu_inline__))
#endif
#endif
const struct key *
keyboard_lookup_key (register const char *str, register unsigned int len)
{
static const struct key wordlist[] =
{
{(char*)0},
{"t", KEY_T},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0},
{"e", KEY_E},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0},
{"a", KEY_A},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0},
{"p", KEY_P},
{(char*)0},
{"sat", KEY_SAT},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0},
{"tape", KEY_TAPE},
{(char*)0},
{"s", KEY_S},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0},
{"c", KEY_C},
{(char*)0}, {(char*)0}, {(char*)0},
{"paste", KEY_PASTE},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0},
{"m", KEY_M},
{(char*)0}, {(char*)0},
{"text", KEY_TEXT},
{(char*)0}, {(char*)0},
{"pc", KEY_PC},
{(char*)0}, {(char*)0}, {(char*)0},
{"o", KEY_O},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0},
{"esc", KEY_ESC},
{(char*)0},
{"space", KEY_SPACE},
{"camera_left", KEY_CAMERA_LEFT},
{"camera_right", KEY_CAMERA_RIGHT},
{(char*)0},
{"camera_zoomout", KEY_CAMERA_ZOOMOUT},
{(char*)0},
{"camera", KEY_CAMERA},
{(char*)0}, {(char*)0},
{"stop", KEY_STOP},
{(char*)0},
{"q", KEY_Q},
{(char*)0}, {(char*)0},
{"camera_up", KEY_CAMERA_UP},
{"apostrophe", KEY_APOSTROPHE},
{(char*)0},
{"restart", KEY_RESTART},
{(char*)0}, {(char*)0}, {(char*)0},
{"j", KEY_J},
{"camera_focus", KEY_CAMERA_FOCUS},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{"x", KEY_X},
{(char*)0},
{"database", KEY_DATABASE},
{(char*)0}, {(char*)0},
{"spreadsheet", KEY_SPREADSHEET},
{"compose", KEY_COMPOSE},
{"dot", KEY_DOT},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{"r", KEY_R},
{(char*)0}, {(char*)0}, {(char*)0},
{"comma", KEY_COMMA},
{(char*)0},
{"ro", KEY_RO},
{"alterase", KEY_ALTERASE},
{"memo", KEY_MEMO},
{"sport", KEY_SPORT},
{(char*)0}, {(char*)0}, {(char*)0},
{"last", KEY_LAST},
{(char*)0},
{"select", KEY_SELECT},
{(char*)0}, {(char*)0},
{"messenger", KEY_MESSENGER},
{(char*)0},
{"9", KEY_9},
{(char*)0}, {(char*)0}, {(char*)0},
{"props", KEY_PROPS},
{"stopcd", KEY_STOPCD},
{(char*)0}, {(char*)0},
{"mode", KEY_MODE},
{"sleep", KEY_SLEEP},
{"d", KEY_D},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0},
{"scrollup", KEY_SCROLLUP},
{(char*)0},
{"macro", KEY_MACRO},
{"z", KEY_Z},
{"ejectcd", KEY_EJECTCD},
{(char*)0}, {(char*)0},
{"scale", KEY_SCALE},
{(char*)0},
{"ejectclosecd", KEY_EJECTCLOSECD},
{"computer", KEY_COMPUTER},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{"reserved", KEY_RESERVED},
{(char*)0}, {(char*)0}, {(char*)0},
{"cd", KEY_CD},
{(char*)0}, {(char*)0},
{"msdos", KEY_MSDOS},
{"y", KEY_Y},
{"zoomout", KEY_ZOOMOUT},
{(char*)0},
{"zoomreset", KEY_ZOOMRESET},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{"calc", KEY_CALC},
{"close", KEY_CLOSE},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{"next", KEY_NEXT},
{(char*)0},
{"delete", KEY_DELETE},
{(char*)0}, {(char*)0}, {(char*)0},
{"deletefile", KEY_DELETEFILE},
{"record", KEY_RECORD},
{(char*)0}, {(char*)0},
{"zoom", KEY_ZOOM},
{"clear", KEY_CLEAR},
{"l", KEY_L},
{(char*)0},
{"calendar", KEY_CALENDAR},
{"redo", KEY_REDO},
{"enter", KEY_ENTER},
{"camera_down", KEY_CAMERA_DOWN},
{(char*)0},
{"camera_zoomin", KEY_CAMERA_ZOOMIN},
{"time", KEY_TIME},
{(char*)0}, {(char*)0}, {(char*)0},
{"red", KEY_RED},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{"cut", KEY_CUT},
{(char*)0}, {(char*)0}, {(char*)0},
{"up", KEY_UP},
{(char*)0},
{"playpause", KEY_PLAYPAUSE},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{"exit", KEY_EXIT},
{"sysrq", KEY_SYSRQ},
{(char*)0}, {(char*)0}, {(char*)0},
{"mute", KEY_MUTE},
{"setup", KEY_SETUP},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0},
{"0", KEY_0},
{"presentation", KEY_PRESENTATION},
{"sendfile", KEY_SENDFILE},
{(char*)0},
{"pause", KEY_PAUSE},
{"screen", KEY_SCREEN},
{(char*)0}, {(char*)0},
{"copy", KEY_COPY},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{"edit", KEY_EDIT},
{(char*)0}, {(char*)0},
{"closecd", KEY_CLOSECD},
{"iso", KEY_ISO},
{(char*)0}, {(char*)0}, {(char*)0},
{"micmute", KEY_MICMUTE},
{"del_line", KEY_DEL_LINE},
{(char*)0}, {(char*)0}, {(char*)0},
{"cyclewindows", KEY_CYCLEWINDOWS},
{(char*)0}, {(char*)0},
{"touchpad_toggle", KEY_TOUCHPAD_TOGGLE},
{"n", KEY_N},
{(char*)0}, {(char*)0}, {(char*)0},
{"reply", KEY_REPLY},
{(char*)0},
{"del_eos", KEY_DEL_EOS},
{(char*)0}, {(char*)0},
{"scrolldown", KEY_SCROLLDOWN},
{"player", KEY_PLAYER},
{(char*)0}, {(char*)0},
{"teen", KEY_TEEN},
{"title", KEY_TITLE},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0},
{"pageup", KEY_PAGEUP},
{"media_repeat", KEY_MEDIA_REPEAT},
{"end", KEY_END},
{(char*)0},
{"media", KEY_MEDIA},
{"playcd", KEY_PLAYCD},
{(char*)0},
{"displaytoggle", KEY_DISPLAYTOGGLE},
{"list", KEY_LIST},
{(char*)0},
{"cancel", KEY_CANCEL},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0},
{"play", KEY_PLAY},
{"games", KEY_GAMES},
{"1", KEY_1},
{(char*)0},
{"aux", KEY_AUX},
{"send", KEY_SEND},
{(char*)0},
{"zoomin", KEY_ZOOMIN},
{(char*)0},
{"katakana", KEY_KATAKANA},
{(char*)0}, {(char*)0},
{"editor", KEY_EDITOR},
{"pausecd", KEY_PAUSECD},
{(char*)0}, {(char*)0},
{"email", KEY_EMAIL},
{"katakanahiragana", KEY_KATAKANAHIRAGANA},
{(char*)0}, {(char*)0},
{"open", KEY_OPEN},
{(char*)0}, {(char*)0},
{"suspend", KEY_SUSPEND},
{(char*)0},
{"euro", KEY_EURO},
{(char*)0}, {(char*)0},
{"connect", KEY_CONNECT},
{(char*)0}, {(char*)0}, {(char*)0},
{"insert", KEY_INSERT},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0},
{"goto", KEY_GOTO},
{(char*)0},
{"i", KEY_I},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0},
{"hp", KEY_HP},
{"capslock", KEY_CAPSLOCK},
{"documents", KEY_DOCUMENTS},
{"radio", KEY_RADIO},
{(char*)0}, {(char*)0}, {(char*)0},
{"chat", KEY_CHAT},
{"equal", KEY_EQUAL},
{"option", KEY_OPTION},
{"del_eol", KEY_DEL_EOL},
{(char*)0},
{"bassboost", KEY_BASSBOOST},
{(char*)0}, {(char*)0},
{"kpcomma", KEY_KPCOMMA},
{"yen", KEY_YEN},
{"semicolon", KEY_SEMICOLON},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{"kpjpcomma", KEY_KPJPCOMMA},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0},
{"dollar", KEY_DOLLAR},
{(char*)0},
{"mhp", KEY_MHP},
{(char*)0}, {(char*)0}, {(char*)0},
{"program", KEY_PROGRAM},
{(char*)0}, {(char*)0},
{"print", KEY_PRINT},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0},
{"u", KEY_U},
{(char*)0}, {(char*)0},
{"home", KEY_HOME},
{"screenlock", KEY_SCREENLOCK},
{"touchpad_on", KEY_TOUCHPAD_ON},
{"context_menu", KEY_CONTEXT_MENU},
{"homepage", KEY_HOMEPAGE},
{"graphicseditor", KEY_GRAPHICSEDITOR},
{"tuner", KEY_TUNER},
{"8", KEY_8},
{(char*)0},
{"question", KEY_QUESTION},
{"shop", KEY_SHOP},
{"kpdot", KEY_KPDOT},
{(char*)0}, {(char*)0},
{"ins_line", KEY_INS_LINE},
{"directory", KEY_DIRECTORY},
{(char*)0},
{"7", KEY_7},
{"battery", KEY_BATTERY},
{"pagedown", KEY_PAGEDOWN},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0},
{"mail", KEY_MAIL},
{(char*)0},
{"search", KEY_SEARCH},
{(char*)0}, {(char*)0}, {(char*)0},
{"scrolllock", KEY_SCROLLLOCK},
{(char*)0},
{"archive", KEY_ARCHIVE},
{(char*)0}, {(char*)0},
{"spellcheck", KEY_SPELLCHECK},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0},
{"kpplus", KEY_KPPLUS},
{"numeric_star", KEY_NUMERIC_STAR},
{"kp9", KEY_KP9},
{(char*)0}, {(char*)0},
{"kpplusminus", KEY_KPPLUSMINUS},
{(char*)0},
{"nextsong", KEY_NEXTSONG},
{"numeric_9", KEY_NUMERIC_9},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0},
{"kpequal", KEY_KPEQUAL},
{"numeric_pound", KEY_NUMERIC_POUND},
{(char*)0},
{"green", KEY_GREEN},
{(char*)0}, {(char*)0}, {(char*)0},
{"direction", KEY_DIRECTION},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{"help", KEY_HELP},
{"sound", KEY_SOUND},
{(char*)0}, {(char*)0}, {(char*)0},
{"save", KEY_SAVE},
{"power", KEY_POWER},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{"undo", KEY_UNDO},
{"slash", KEY_SLASH},
{"images", KEY_IMAGES},
{(char*)0}, {(char*)0},
{"left", KEY_LEFT},
{(char*)0},
{"fastforward", KEY_FASTFORWARD},
{"leftalt", KEY_LEFTALT},
{(char*)0},
{"leftshift", KEY_LEFTSHIFT},
{(char*)0},
{"g", KEY_G},
{(char*)0}, {(char*)0},
{"leftbrace", KEY_LEFTBRACE},
{"audio", KEY_AUDIO},
{(char*)0}, {(char*)0},
{"leftmeta", KEY_LEFTMETA},
{"numeric_0", KEY_NUMERIC_0},
{(char*)0}, {(char*)0}, {(char*)0},
{"linefeed", KEY_LINEFEED},
{"move", KEY_MOVE},
{"angle", KEY_ANGLE},
{(char*)0},
{"kpenter", KEY_KPENTER},
{"language", KEY_LANGUAGE},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{"epg", KEY_EPG},
{"dashboard", KEY_DASHBOARD},
{"prog1", KEY_PROG1},
{"addressbook", KEY_ADDRESSBOOK},
{"f9", KEY_F9},
{(char*)0},
{"channelup", KEY_CHANNELUP},
{"phone", KEY_PHONE},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0},
{"kpminus", KEY_KPMINUS},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0},
{"numeric_1", KEY_NUMERIC_1},
{"hanja", KEY_HANJA},
{(char*)0}, {(char*)0},
{"previous", KEY_PREVIOUS},
{"news", KEY_NEWS},
{(char*)0},
{"3", KEY_3},
{(char*)0},
{"subtitle", KEY_SUBTITLE},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{"kp0", KEY_KP0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0},
{"kpleftparen", KEY_KPLEFTPAREN},
{(char*)0}, {(char*)0},
{"xfer", KEY_XFER},
{(char*)0},
{"2", KEY_2},
{"frameforward", KEY_FRAMEFORWARD},
{(char*)0}, {(char*)0},
{"minus", KEY_MINUS},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{"switchvideomode", KEY_SWITCHVIDEOMODE},
{"k", KEY_K},
{(char*)0},
{"pvr", KEY_PVR},
{"menu", KEY_MENU},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{"vcr", KEY_VCR},
{"numeric_8", KEY_NUMERIC_8},
{"again", KEY_AGAIN},
{(char*)0}, {(char*)0},
{"mp3", KEY_MP3},
{"numeric_7", KEY_NUMERIC_7},
{(char*)0},
{"4", KEY_4},
{(char*)0},
{"hiragana", KEY_HIRAGANA},
{"sat2", KEY_SAT2},
{(char*)0}, {(char*)0}, {(char*)0},
{"leftctrl", KEY_LEFTCTRL},
{"fn_e", KEY_FN_E},
{(char*)0}, {(char*)0}, {(char*)0},
{"wordprocessor", KEY_WORDPROCESSOR},
{(char*)0}, {(char*)0}, {(char*)0},
{"ok", KEY_OK},
{(char*)0}, {(char*)0},
{"wps_button", KEY_WPS_BUTTON},
{(char*)0},
{"channel", KEY_CHANNEL},
{(char*)0}, {(char*)0},
{"front", KEY_FRONT},
{(char*)0}, {(char*)0},
{"kp1", KEY_KP1},
{(char*)0}, {(char*)0},
{"fn_esc", KEY_FN_ESC},
{(char*)0}, {(char*)0}, {(char*)0},
{"kpasterisk", KEY_KPASTERISK},
{(char*)0}, {(char*)0}, {(char*)0},
{"fn_s", KEY_FN_S},
{"wimax", KEY_WIMAX},
{"b", KEY_B},
{(char*)0},
{"brl_dot9", KEY_BRL_DOT9},
{"blue", KEY_BLUE},
{"prog3", KEY_PROG3},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{"first", KEY_FIRST},
{"6", KEY_6},
{"ab", KEY_AB},
{"tab", KEY_TAB},
{"twen", KEY_TWEN},
{"prog2", KEY_PROG2},
{(char*)0},
{"touchpad_off", KEY_TOUCHPAD_OFF},
{(char*)0},
{"backspace", KEY_BACKSPACE},
{(char*)0},
{"channeldown", KEY_CHANNELDOWN},
{(char*)0}, {(char*)0},
{"numeric_3", KEY_NUMERIC_3},
{(char*)0}, {(char*)0},
{"fn", KEY_FN},
{(char*)0}, {(char*)0},
{"prog4", KEY_PROG4},
{"h", KEY_H},
{"10channelsup", KEY_10CHANNELSUP},
{(char*)0},
{"numeric_2", KEY_NUMERIC_2},
{(char*)0}, {(char*)0}, {(char*)0},
{"dvd", KEY_DVD},
{(char*)0}, {(char*)0},
{"yellow", KEY_YELLOW},
{(char*)0}, {(char*)0},
{"file", KEY_FILE},
{(char*)0},
{"display_off", KEY_DISPLAY_OFF},
{(char*)0}, {(char*)0},
{"numeric_4", KEY_NUMERIC_4},
{(char*)0},
{"wakeup", KEY_WAKEUP},
{(char*)0},
{"f19", KEY_F19},
{(char*)0},
{"break", KEY_BREAK},
{"rewind", KEY_REWIND},
{(char*)0}, {(char*)0},
{"brl_dot10", KEY_BRL_DOT10},
{(char*)0}, {(char*)0},
{"kprightparen", KEY_KPRIGHTPAREN},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{"f1", KEY_F1},
{(char*)0},
{"bookmarks", KEY_BOOKMARKS},
{(char*)0},
{"power2", KEY_POWER2},
{(char*)0}, {(char*)0},
{"numeric_6", KEY_NUMERIC_6},
{"video_next", KEY_VIDEO_NEXT},
{"digits", KEY_DIGITS},
{(char*)0}, {(char*)0}, {(char*)0},
{"videophone", KEY_VIDEOPHONE},
{"5", KEY_5},
{(char*)0},
{"muhenkan", KEY_MUHENKAN},
{(char*)0}, {(char*)0}, {(char*)0},
{"finance", KEY_FINANCE},
{"kp8", KEY_KP8},
{(char*)0}, {(char*)0},
{"w", KEY_W},
{(char*)0},
{"brl_dot1", KEY_BRL_DOT1},
{(char*)0}, {(char*)0},
{"vendor", KEY_VENDOR},
{(char*)0},
{"kp7", KEY_KP7},
{"zenkakuhankaku", KEY_ZENKAKUHANKAKU},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0},
{"video", KEY_VIDEO},
{(char*)0}, {(char*)0}, {(char*)0},
{"numeric_5", KEY_NUMERIC_5},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0},
{"fn_d", KEY_FN_D},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{"down", KEY_DOWN},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{"wlan", KEY_WLAN},
{(char*)0},
{"f", KEY_F},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0},
{"kpslash", KEY_KPSLASH},
{(char*)0},
{"info", KEY_INFO},
{"grave", KEY_GRAVE},
{(char*)0},
{"numlock", KEY_NUMLOCK},
{"brl_dot8", KEY_BRL_DOT8},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{"brl_dot7", KEY_BRL_DOT7},
{"frameback", KEY_FRAMEBACK},
{(char*)0}, {(char*)0},
{"previoussong", KEY_PREVIOUSSONG},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0},
{"keyboard", KEY_KEYBOARD},
{"voicemail", KEY_VOICEMAIL},
{"102nd", KEY_102ND},
{(char*)0}, {(char*)0},
{"f10", KEY_F10},
{"10channelsdown", KEY_10CHANNELSDOWN},
{(char*)0}, {(char*)0},
{"f8", KEY_F8},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0},
{"volumeup", KEY_VOLUMEUP},
{(char*)0}, {(char*)0}, {(char*)0},
{"f7", KEY_F7},
{(char*)0}, {(char*)0}, {(char*)0},
{"logoff", KEY_LOGOFF},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0},
{"right", KEY_RIGHT},
{"brightness_cycle", KEY_BRIGHTNESS_CYCLE},
{(char*)0},
{"rightalt", KEY_RIGHTALT},
{(char*)0},
{"rightshift", KEY_RIGHTSHIFT},
{"config", KEY_CONFIG},
{"brightnessup", KEY_BRIGHTNESSUP},
{(char*)0}, {(char*)0},
{"rightbrace", KEY_RIGHTBRACE},
{(char*)0}, {(char*)0},
{"brl_dot3", KEY_BRL_DOT3},
{"rightmeta", KEY_RIGHTMETA},
{(char*)0}, {(char*)0},
{"hangeul", KEY_HANGEUL},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{"refresh", KEY_REFRESH},
{"brl_dot2", KEY_BRL_DOT2},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{"kp3", KEY_KP3},
{"find", KEY_FIND},
{"brightness_zero", KEY_BRIGHTNESS_ZERO},
{(char*)0}, {(char*)0},
{"f11", KEY_F11},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{"brl_dot4", KEY_BRL_DOT4},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{"new", KEY_NEW},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{"kp2", KEY_KP2},
{(char*)0}, {(char*)0},
{"v", KEY_V},
{"tv", KEY_TV},
{(char*)0},
{"kbdillumtoggle", KEY_KBDILLUMTOGGLE},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{"slow", KEY_SLOW},
{"kbdillumup", KEY_KBDILLUMUP},
{(char*)0}, {(char*)0},
{"brl_dot6", KEY_BRL_DOT6},
{"favorites", KEY_FAVORITES},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0},
{"kp4", KEY_KP4},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0},
{"henkan", KEY_HENKAN},
{(char*)0}, {(char*)0},
{"fn_1", KEY_FN_1},
{(char*)0}, {(char*)0},
{"unknown", KEY_UNKNOWN},
{"f20", KEY_F20},
{(char*)0}, {(char*)0}, {(char*)0},
{"forward", KEY_FORWARD},
{"brl_dot5", KEY_BRL_DOT5},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0},
{"volumedown", KEY_VOLUMEDOWN},
{(char*)0},
{"f3", KEY_F3},
{(char*)0},
{"back", KEY_BACK},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{"rightctrl", KEY_RIGHTCTRL},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0},
{"shuffle", KEY_SHUFFLE},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{"f2", KEY_F2},
{"kp6", KEY_KP6},
{(char*)0}, {(char*)0},
{"forwardmail", KEY_FORWARDMAIL},
{(char*)0},
{"f18", KEY_F18},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0},
{"brightnessdown", KEY_BRIGHTNESSDOWN},
{(char*)0}, {(char*)0}, {(char*)0},
{"f17", KEY_F17},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0},
{"bluetooth", KEY_BLUETOOTH},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0},
{"f4", KEY_F4},
{(char*)0},
{"backslash", KEY_BACKSLASH},
{(char*)0}, {(char*)0}, {(char*)0},
{"f21", KEY_F21},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{"tv2", KEY_TV2},
{(char*)0}, {(char*)0}, {(char*)0},
{"kbdillumdown", KEY_KBDILLUMDOWN},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0},
{"kp5", KEY_KP5},
{(char*)0}, {(char*)0},
{"rfkill", KEY_RFKILL},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0},
{"f6", KEY_F6},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0},
{"fn_f9", KEY_FN_F9},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0},
{"f13", KEY_F13},
{(char*)0}, {(char*)0}, {(char*)0},
{"f5", KEY_F5},
{(char*)0},
{"vcr2", KEY_VCR2},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0},
{"fn_f10", KEY_FN_F10},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0},
{"f12", KEY_F12},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0},
{"fn_f1", KEY_FN_F1},
{"fn_f11", KEY_FN_F11},
{(char*)0},
{"f14", KEY_F14},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0},
{"video_prev", KEY_VIDEO_PREV},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0},
{"fn_2", KEY_FN_2},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{"fn_f8", KEY_FN_F8},
{(char*)0}, {(char*)0},
{"f16", KEY_F16},
{(char*)0},
{"fn_f7", KEY_FN_F7},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{"uwb", KEY_UWB},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0},
{"f23", KEY_F23},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0},
{"fn_b", KEY_FN_B},
{(char*)0}, {(char*)0}, {(char*)0},
{"f22", KEY_F22},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{"fn_f3", KEY_FN_F3},
{(char*)0}, {(char*)0},
{"f15", KEY_F15},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0},
{"fn_f2", KEY_FN_F2},
{"fn_f12", KEY_FN_F12},
{(char*)0},
{"f24", KEY_F24},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0},
{"fn_f4", KEY_FN_F4},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{"fn_f6", KEY_FN_F6},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0},
{"fn_f5", KEY_FN_F5},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0},
{"fn_f", KEY_FN_F},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0},
{"www", KEY_WWW}
};
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
{
register int key = hash_key_name (str, len);
if (key <= MAX_HASH_VALUE && key >= 0)
{
register const char *s = wordlist[key].name;
if (s && *str == *s && !strcmp (str + 1, s + 1))
return &wordlist[key];
}
}
return 0;
}

View File

@ -1,394 +0,0 @@
const char* const key_names[KEY_CNT] = {
[KEY_HIRAGANA] = "KEY_HIRAGANA",
[KEY_TOUCHPAD_TOGGLE] = "KEY_TOUCHPAD_TOGGLE",
[KEY_DELETEFILE] = "KEY_DELETEFILE",
[KEY_TITLE] = "KEY_TITLE",
[KEY_GRAVE] = "KEY_GRAVE",
[KEY_RESERVED] = "KEY_RESERVED",
[KEY_DVD] = "KEY_DVD",
[KEY_FN_F10] = "KEY_FN_F10",
[KEY_FN_F11] = "KEY_FN_F11",
[KEY_FN_F12] = "KEY_FN_F12",
[KEY_FRAMEBACK] = "KEY_FRAMEBACK",
[KEY_BRL_DOT10] = "KEY_BRL_DOT10",
[KEY_SLEEP] = "KEY_SLEEP",
[KEY_VCR2] = "KEY_VCR2",
[KEY_ZENKAKUHANKAKU] = "KEY_ZENKAKUHANKAKU",
[KEY_IMAGES] = "KEY_IMAGES",
[KEY_LEFTMETA] = "KEY_LEFTMETA",
[KEY_OPEN] = "KEY_OPEN",
[KEY_BATTERY] = "KEY_BATTERY",
[KEY_MACRO] = "KEY_MACRO",
[KEY_MODE] = "KEY_MODE",
[KEY_GREEN] = "KEY_GREEN",
[KEY_SAT] = "KEY_SAT",
[KEY_RIGHTMETA] = "KEY_RIGHTMETA",
[KEY_COMPUTER] = "KEY_COMPUTER",
[KEY_SELECT] = "KEY_SELECT",
[KEY_PAGEDOWN] = "KEY_PAGEDOWN",
[KEY_CAPSLOCK] = "KEY_CAPSLOCK",
[KEY_REDO] = "KEY_REDO",
[KEY_KBDILLUMDOWN] = "KEY_KBDILLUMDOWN",
[KEY_SCROLLDOWN] = "KEY_SCROLLDOWN",
[KEY_SWITCHVIDEOMODE] = "KEY_SWITCHVIDEOMODE",
[KEY_LIST] = "KEY_LIST",
[KEY_WORDPROCESSOR] = "KEY_WORDPROCESSOR",
[KEY_CAMERA] = "KEY_CAMERA",
[KEY_MOVE] = "KEY_MOVE",
[KEY_CONNECT] = "KEY_CONNECT",
[KEY_PROG1] = "KEY_PROG1",
[KEY_PROG2] = "KEY_PROG2",
[KEY_PROG3] = "KEY_PROG3",
[KEY_PROG4] = "KEY_PROG4",
[KEY_TWEN] = "KEY_TWEN",
[KEY_INS_LINE] = "KEY_INS_LINE",
[KEY_GAMES] = "KEY_GAMES",
[KEY_KATAKANA] = "KEY_KATAKANA",
[KEY_PROPS] = "KEY_PROPS",
[KEY_CALENDAR] = "KEY_CALENDAR",
[KEY_RESTART] = "KEY_RESTART",
[KEY_KBDILLUMTOGGLE] = "KEY_KBDILLUMTOGGLE",
[KEY_CLEAR] = "KEY_CLEAR",
[KEY_CAMERA_FOCUS] = "KEY_CAMERA_FOCUS",
[KEY_NUMLOCK] = "KEY_NUMLOCK",
[KEY_ZOOMIN] = "KEY_ZOOMIN",
[KEY_EDIT] = "KEY_EDIT",
[KEY_AUX] = "KEY_AUX",
[KEY_EQUAL] = "KEY_EQUAL",
[KEY_DIRECTORY] = "KEY_DIRECTORY",
[KEY_CAMERA_RIGHT] = "KEY_CAMERA_RIGHT",
[KEY_ADDRESSBOOK] = "KEY_ADDRESSBOOK",
[KEY_PASTE] = "KEY_PASTE",
[KEY_CHANNELUP] = "KEY_CHANNELUP",
[KEY_SHUFFLE] = "KEY_SHUFFLE",
[KEY_MAIL] = "KEY_MAIL",
[KEY_LEFTALT] = "KEY_LEFTALT",
[KEY_WWW] = "KEY_WWW",
[KEY_KPEQUAL] = "KEY_KPEQUAL",
[KEY_HENKAN] = "KEY_HENKAN",
[KEY_DISPLAYTOGGLE] = "KEY_DISPLAYTOGGLE",
[KEY_RIGHTALT] = "KEY_RIGHTALT",
[KEY_SPORT] = "KEY_SPORT",
[KEY_POWER] = "KEY_POWER",
[KEY_APOSTROPHE] = "KEY_APOSTROPHE",
[KEY_SCREEN] = "KEY_SCREEN",
[KEY_RADIO] = "KEY_RADIO",
[KEY_DATABASE] = "KEY_DATABASE",
[KEY_VOLUMEDOWN] = "KEY_VOLUMEDOWN",
[KEY_SENDFILE] = "KEY_SENDFILE",
[KEY_RIGHTSHIFT] = "KEY_RIGHTSHIFT",
[KEY_ARCHIVE] = "KEY_ARCHIVE",
[KEY_NUMERIC_POUND] = "KEY_NUMERIC_POUND",
[KEY_EPG] = "KEY_EPG",
[KEY_NEXTSONG] = "KEY_NEXTSONG",
[KEY_FIRST] = "KEY_FIRST",
[KEY_SPREADSHEET] = "KEY_SPREADSHEET",
[KEY_KPSLASH] = "KEY_KPSLASH",
[KEY_BACK] = "KEY_BACK",
[KEY_KP3] = "KEY_KP3",
[KEY_KP5] = "KEY_KP5",
[KEY_PAGEUP] = "KEY_PAGEUP",
[KEY_ESC] = "KEY_ESC",
[KEY_DELETE] = "KEY_DELETE",
[KEY_HOME] = "KEY_HOME",
[KEY_WPS_BUTTON] = "KEY_WPS_BUTTON",
[KEY_AUDIO] = "KEY_AUDIO",
[KEY_NEW] = "KEY_NEW",
[KEY_SAT2] = "KEY_SAT2",
[KEY_LINEFEED] = "KEY_LINEFEED",
[KEY_PVR] = "KEY_PVR",
[KEY_KPPLUSMINUS] = "KEY_KPPLUSMINUS",
[KEY_SHOP] = "KEY_SHOP",
[KEY_LEFTSHIFT] = "KEY_LEFTSHIFT",
[KEY_BASSBOOST] = "KEY_BASSBOOST",
[KEY_BRIGHTNESS_CYCLE] = "KEY_BRIGHTNESS_CYCLE",
[KEY_TAB] = "KEY_TAB",
[KEY_UNKNOWN] = "KEY_UNKNOWN",
[KEY_KPLEFTPAREN] = "KEY_KPLEFTPAREN",
[KEY_EDITOR] = "KEY_EDITOR",
[KEY_EMAIL] = "KEY_EMAIL",
[KEY_102ND] = "KEY_102ND",
[KEY_MENU] = "KEY_MENU",
[KEY_VOICEMAIL] = "KEY_VOICEMAIL",
[KEY_SPACE] = "KEY_SPACE",
[KEY_INFO] = "KEY_INFO",
[KEY_WAKEUP] = "KEY_WAKEUP",
[KEY_BLUE] = "KEY_BLUE",
[KEY_HOMEPAGE] = "KEY_HOMEPAGE",
[KEY_KPCOMMA] = "KEY_KPCOMMA",
[KEY_ZOOMRESET] = "KEY_ZOOMRESET",
[KEY_FAVORITES] = "KEY_FAVORITES",
[KEY_TOUCHPAD_ON] = "KEY_TOUCHPAD_ON",
[KEY_FN_1] = "KEY_FN_1",
[KEY_FN_2] = "KEY_FN_2",
[KEY_ISO] = "KEY_ISO",
[KEY_FN_D] = "KEY_FN_D",
[KEY_FN_E] = "KEY_FN_E",
[KEY_FN_F] = "KEY_FN_F",
[KEY_FN_S] = "KEY_FN_S",
[KEY_HANJA] = "KEY_HANJA",
[KEY_BREAK] = "KEY_BREAK",
[KEY_FORWARD] = "KEY_FORWARD",
[KEY_TV2] = "KEY_TV2",
[KEY_PAUSECD] = "KEY_PAUSECD",
[KEY_RIGHT] = "KEY_RIGHT",
[KEY_F21] = "KEY_F21",
[KEY_SLOW] = "KEY_SLOW",
[KEY_F10] = "KEY_F10",
[KEY_F11] = "KEY_F11",
[KEY_F12] = "KEY_F12",
[KEY_F13] = "KEY_F13",
[KEY_F14] = "KEY_F14",
[KEY_F15] = "KEY_F15",
[KEY_F16] = "KEY_F16",
[KEY_F17] = "KEY_F17",
[KEY_F18] = "KEY_F18",
[KEY_F19] = "KEY_F19",
[KEY_SEMICOLON] = "KEY_SEMICOLON",
[KEY_F20] = "KEY_F20",
[KEY_F22] = "KEY_F22",
[KEY_F23] = "KEY_F23",
[KEY_F24] = "KEY_F24",
[KEY_SAVE] = "KEY_SAVE",
[KEY_1] = "KEY_1",
[KEY_2] = "KEY_2",
[KEY_3] = "KEY_3",
[KEY_4] = "KEY_4",
[KEY_5] = "KEY_5",
[KEY_6] = "KEY_6",
[KEY_7] = "KEY_7",
[KEY_8] = "KEY_8",
[KEY_9] = "KEY_9",
[KEY_B] = "KEY_B",
[KEY_C] = "KEY_C",
[KEY_D] = "KEY_D",
[KEY_E] = "KEY_E",
[KEY_F] = "KEY_F",
[KEY_G] = "KEY_G",
[KEY_H] = "KEY_H",
[KEY_I] = "KEY_I",
[KEY_K] = "KEY_K",
[KEY_L] = "KEY_L",
[KEY_M] = "KEY_M",
[KEY_O] = "KEY_O",
[KEY_P] = "KEY_P",
[KEY_R] = "KEY_R",
[KEY_S] = "KEY_S",
[KEY_T] = "KEY_T",
[KEY_U] = "KEY_U",
[KEY_W] = "KEY_W",
[KEY_X] = "KEY_X",
[KEY_Z] = "KEY_Z",
[KEY_MHP] = "KEY_MHP",
[KEY_F5] = "KEY_F5",
[KEY_RECORD] = "KEY_RECORD",
[KEY_F7] = "KEY_F7",
[KEY_CHANNEL] = "KEY_CHANNEL",
[KEY_EJECTCD] = "KEY_EJECTCD",
[KEY_VIDEOPHONE] = "KEY_VIDEOPHONE",
[KEY_VIDEO] = "KEY_VIDEO",
[KEY_VENDOR] = "KEY_VENDOR",
[KEY_MP3] = "KEY_MP3",
[KEY_0] = "KEY_0",
[KEY_AGAIN] = "KEY_AGAIN",
[KEY_DIGITS] = "KEY_DIGITS",
[KEY_SEND] = "KEY_SEND",
[KEY_MICMUTE] = "KEY_MICMUTE",
[KEY_COMMA] = "KEY_COMMA",
[KEY_GRAPHICSEDITOR] = "KEY_GRAPHICSEDITOR",
[KEY_A] = "KEY_A",
[KEY_J] = "KEY_J",
[KEY_YELLOW] = "KEY_YELLOW",
[KEY_LEFTBRACE] = "KEY_LEFTBRACE",
[KEY_N] = "KEY_N",
[KEY_QUESTION] = "KEY_QUESTION",
[KEY_LANGUAGE] = "KEY_LANGUAGE",
[KEY_XFER] = "KEY_XFER",
[KEY_Q] = "KEY_Q",
[KEY_LOGOFF] = "KEY_LOGOFF",
[KEY_SOUND] = "KEY_SOUND",
[KEY_V] = "KEY_V",
[KEY_PRINT] = "KEY_PRINT",
[KEY_Y] = "KEY_Y",
[KEY_COPY] = "KEY_COPY",
[KEY_CAMERA_ZOOMOUT] = "KEY_CAMERA_ZOOMOUT",
[KEY_BRL_DOT1] = "KEY_BRL_DOT1",
[KEY_BRL_DOT2] = "KEY_BRL_DOT2",
[KEY_BRL_DOT3] = "KEY_BRL_DOT3",
[KEY_BRL_DOT4] = "KEY_BRL_DOT4",
[KEY_BRL_DOT5] = "KEY_BRL_DOT5",
[KEY_BRL_DOT6] = "KEY_BRL_DOT6",
[KEY_BRL_DOT7] = "KEY_BRL_DOT7",
[KEY_BRL_DOT8] = "KEY_BRL_DOT8",
[KEY_BRL_DOT9] = "KEY_BRL_DOT9",
[KEY_BRIGHTNESSUP] = "KEY_BRIGHTNESSUP",
[KEY_FN_F7] = "KEY_FN_F7",
[KEY_YEN] = "KEY_YEN",
[KEY_PLAY] = "KEY_PLAY",
[KEY_REWIND] = "KEY_REWIND",
[KEY_VIDEO_NEXT] = "KEY_VIDEO_NEXT",
[KEY_DIRECTION] = "KEY_DIRECTION",
[KEY_TOUCHPAD_OFF] = "KEY_TOUCHPAD_OFF",
[KEY_HELP] = "KEY_HELP",
[KEY_NUMERIC_STAR] = "KEY_NUMERIC_STAR",
[KEY_BACKSLASH] = "KEY_BACKSLASH",
[KEY_SYSRQ] = "KEY_SYSRQ",
[KEY_END] = "KEY_END",
[KEY_RFKILL] = "KEY_RFKILL",
[KEY_LEFTCTRL] = "KEY_LEFTCTRL",
[KEY_KPRIGHTPAREN] = "KEY_KPRIGHTPAREN",
[KEY_KPASTERISK] = "KEY_KPASTERISK",
[KEY_REFRESH] = "KEY_REFRESH",
[KEY_RIGHTCTRL] = "KEY_RIGHTCTRL",
[KEY_SEARCH] = "KEY_SEARCH",
[KEY_PHONE] = "KEY_PHONE",
[KEY_KBDILLUMUP] = "KEY_KBDILLUMUP",
[KEY_STOP] = "KEY_STOP",
[KEY_BRIGHTNESS_ZERO] = "KEY_BRIGHTNESS_ZERO",
[KEY_CHAT] = "KEY_CHAT",
[KEY_VOLUMEUP] = "KEY_VOLUMEUP",
[KEY_CLOSECD] = "KEY_CLOSECD",
[KEY_CAMERA_ZOOMIN] = "KEY_CAMERA_ZOOMIN",
[KEY_UNDO] = "KEY_UNDO",
[KEY_TUNER] = "KEY_TUNER",
[KEY_ANGLE] = "KEY_ANGLE",
[KEY_PRESENTATION] = "KEY_PRESENTATION",
[KEY_CAMERA_DOWN] = "KEY_CAMERA_DOWN",
[KEY_REPLY] = "KEY_REPLY",
[KEY_CALC] = "KEY_CALC",
[KEY_EXIT] = "KEY_EXIT",
[KEY_FN_B] = "KEY_FN_B",
[KEY_DOLLAR] = "KEY_DOLLAR",
[KEY_CAMERA_LEFT] = "KEY_CAMERA_LEFT",
[KEY_UWB] = "KEY_UWB",
[KEY_PREVIOUSSONG] = "KEY_PREVIOUSSONG",
[KEY_CONFIG] = "KEY_CONFIG",
[KEY_SETUP] = "KEY_SETUP",
[KEY_PLAYCD] = "KEY_PLAYCD",
[KEY_MEDIA] = "KEY_MEDIA",
[KEY_COMPOSE] = "KEY_COMPOSE",
[KEY_PLAYER] = "KEY_PLAYER",
[KEY_10CHANNELSDOWN] = "KEY_10CHANNELSDOWN",
[KEY_FRAMEFORWARD] = "KEY_FRAMEFORWARD",
[KEY_MSDOS] = "KEY_MSDOS",
[KEY_ZOOM] = "KEY_ZOOM",
[KEY_NEWS] = "KEY_NEWS",
[KEY_NUMERIC_0] = "KEY_NUMERIC_0",
[KEY_NUMERIC_1] = "KEY_NUMERIC_1",
[KEY_NUMERIC_2] = "KEY_NUMERIC_2",
[KEY_NUMERIC_3] = "KEY_NUMERIC_3",
[KEY_NUMERIC_4] = "KEY_NUMERIC_4",
[KEY_NUMERIC_5] = "KEY_NUMERIC_5",
[KEY_NUMERIC_7] = "KEY_NUMERIC_7",
[KEY_NUMERIC_8] = "KEY_NUMERIC_8",
[KEY_NUMERIC_9] = "KEY_NUMERIC_9",
[KEY_SCALE] = "KEY_SCALE",
[KEY_NEXT] = "KEY_NEXT",
[KEY_CUT] = "KEY_CUT",
[KEY_PREVIOUS] = "KEY_PREVIOUS",
[KEY_VIDEO_PREV] = "KEY_VIDEO_PREV",
[KEY_MUTE] = "KEY_MUTE",
[KEY_PAUSE] = "KEY_PAUSE",
[KEY_TAPE] = "KEY_TAPE",
[KEY_PROGRAM] = "KEY_PROGRAM",
[KEY_OPTION] = "KEY_OPTION",
[KEY_ZOOMOUT] = "KEY_ZOOMOUT",
[KEY_PLAYPAUSE] = "KEY_PLAYPAUSE",
[KEY_DISPLAY_OFF] = "KEY_DISPLAY_OFF",
[KEY_RED] = "KEY_RED",
[KEY_KPPLUS] = "KEY_KPPLUS",
[KEY_FINANCE] = "KEY_FINANCE",
[KEY_BRIGHTNESSDOWN] = "KEY_BRIGHTNESSDOWN",
[KEY_KPDOT] = "KEY_KPDOT",
[KEY_TEEN] = "KEY_TEEN",
[KEY_SCREENLOCK] = "KEY_SCREENLOCK",
[KEY_FN_F1] = "KEY_FN_F1",
[KEY_FN_F2] = "KEY_FN_F2",
[KEY_FN_F3] = "KEY_FN_F3",
[KEY_FN_F4] = "KEY_FN_F4",
[KEY_FN_F5] = "KEY_FN_F5",
[KEY_FN_F6] = "KEY_FN_F6",
[KEY_FN_F8] = "KEY_FN_F8",
[KEY_FN_F9] = "KEY_FN_F9",
[KEY_EURO] = "KEY_EURO",
[KEY_WIMAX] = "KEY_WIMAX",
[KEY_AB] = "KEY_AB",
[KEY_SUBTITLE] = "KEY_SUBTITLE",
[KEY_CD] = "KEY_CD",
[KEY_CONTEXT_MENU] = "KEY_CONTEXT_MENU",
[KEY_MESSENGER] = "KEY_MESSENGER",
[KEY_F1] = "KEY_F1",
[KEY_F2] = "KEY_F2",
[KEY_F3] = "KEY_F3",
[KEY_F4] = "KEY_F4",
[KEY_F6] = "KEY_F6",
[KEY_F8] = "KEY_F8",
[KEY_F9] = "KEY_F9",
[KEY_FN] = "KEY_FN",
[KEY_SCROLLUP] = "KEY_SCROLLUP",
[KEY_ENTER] = "KEY_ENTER",
[KEY_CANCEL] = "KEY_CANCEL",
[KEY_SCROLLLOCK] = "KEY_SCROLLLOCK",
[KEY_RIGHTBRACE] = "KEY_RIGHTBRACE",
[KEY_VCR] = "KEY_VCR",
[KEY_HP] = "KEY_HP",
[KEY_FASTFORWARD] = "KEY_FASTFORWARD",
[KEY_TEXT] = "KEY_TEXT",
[KEY_FN_ESC] = "KEY_FN_ESC",
[KEY_INSERT] = "KEY_INSERT",
[KEY_CYCLEWINDOWS] = "KEY_CYCLEWINDOWS",
[KEY_KATAKANAHIRAGANA] = "KEY_KATAKANAHIRAGANA",
[KEY_FRONT] = "KEY_FRONT",
[KEY_WLAN] = "KEY_WLAN",
[KEY_DASHBOARD] = "KEY_DASHBOARD",
[KEY_BLUETOOTH] = "KEY_BLUETOOTH",
[KEY_FORWARDMAIL] = "KEY_FORWARDMAIL",
[KEY_MUHENKAN] = "KEY_MUHENKAN",
[KEY_OK] = "KEY_OK",
[KEY_CHANNELDOWN] = "KEY_CHANNELDOWN",
[KEY_DEL_EOL] = "KEY_DEL_EOL",
[KEY_DOWN] = "KEY_DOWN",
[KEY_DEL_EOS] = "KEY_DEL_EOS",
[KEY_PC] = "KEY_PC",
[KEY_KPENTER] = "KEY_KPENTER",
[KEY_LAST] = "KEY_LAST",
[KEY_KP0] = "KEY_KP0",
[KEY_KP1] = "KEY_KP1",
[KEY_KP2] = "KEY_KP2",
[KEY_KP4] = "KEY_KP4",
[KEY_KP6] = "KEY_KP6",
[KEY_KP7] = "KEY_KP7",
[KEY_KP8] = "KEY_KP8",
[KEY_KP9] = "KEY_KP9",
[KEY_BACKSPACE] = "KEY_BACKSPACE",
[KEY_RO] = "KEY_RO",
[KEY_ALTERASE] = "KEY_ALTERASE",
[KEY_POWER2] = "KEY_POWER2",
[KEY_MINUS] = "KEY_MINUS",
[KEY_KPJPCOMMA] = "KEY_KPJPCOMMA",
[KEY_10CHANNELSUP] = "KEY_10CHANNELSUP",
[KEY_TV] = "KEY_TV",
[KEY_UP] = "KEY_UP",
[KEY_SUSPEND] = "KEY_SUSPEND",
[KEY_FILE] = "KEY_FILE",
[KEY_TIME] = "KEY_TIME",
[KEY_FIND] = "KEY_FIND",
[KEY_STOPCD] = "KEY_STOPCD",
[KEY_SPELLCHECK] = "KEY_SPELLCHECK",
[KEY_DOCUMENTS] = "KEY_DOCUMENTS",
[KEY_LEFT] = "KEY_LEFT",
[KEY_EJECTCLOSECD] = "KEY_EJECTCLOSECD",
[KEY_KPMINUS] = "KEY_KPMINUS",
[KEY_GOTO] = "KEY_GOTO",
[KEY_MEDIA_REPEAT] = "KEY_MEDIA_REPEAT",
[KEY_MEMO] = "KEY_MEMO",
[KEY_SLASH] = "KEY_SLASH",
[KEY_KEYBOARD] = "KEY_KEYBOARD",
[KEY_CAMERA_UP] = "KEY_CAMERA_UP",
[KEY_DEL_LINE] = "KEY_DEL_LINE",
[KEY_CLOSE] = "KEY_CLOSE",
[KEY_DOT] = "KEY_DOT",
[KEY_NUMERIC_6] = "KEY_NUMERIC_6",
[KEY_HANGEUL] = "KEY_HANGEUL",
[KEY_BOOKMARKS] = "KEY_BOOKMARKS",
};

View File

@ -1,51 +0,0 @@
# Custom systemd Makefile include that builds/installs gir only for LFS
# vim: tabstop=3
G_IR_INCLUDES = \
src/gudev/gudev.h \
src/gudev/gudevtypes.h \
src/gudev/gudevenums.h \
src/gudev/gudevenumtypes.h \
src/gudev/gudevclient.h \
src/gudev/gudevdevice.h \
src/gudev/gudevenumerator.h \
src/gudev/gudevclient.c \
src/gudev/gudevdevice.c \
src/gudev/gudevenumerator.c
build/GUdev-1.0.gir: gudev
@echo G-IR-SCANNER $@
$(VB)LD_LIBRARY_PATH=./build g-ir-scanner \
$(G_IR_INCLUDES) \
-D_GUDEV_COMPILATION \
-D_GUDEV_WORK_AROUND_DEV_T_BUG \
-I src -I src/gudev \
-L./build -lgudev-1.0 -ludev \
--quiet \
--warn-all \
--no-libtool \
--include=GObject-2.0 \
--pkg-export=gudev-1.0 \
--c-include=gudev/gudev.h \
--library=gudev-1.0 \
--namespace=GUdev \
--nsversion=1.0 \
--output=$@
build/GUdev-1.0.typelib: build/GUdev-1.0.gir
@echo G-IR-COMPILER $@
$(VB)LIBRARY_PATH=./build g-ir-compiler $< > $@
gir-data: build/GUdev-1.0.gir build/GUdev-1.0.typelib
install-gir-data: gir-data
@mkdir -pv $(DESTDIR)/usr/lib/girepository-1.0 \
$(DESTDIR)/usr/share/gir-1.0
@cp -v build/GUdev-1.0.typelib $(DESTDIR)/usr/lib/girepository-1.0
@cp -v build/GUdev-1.0.gir $(DESTDIR)/usr/share/gir-1.0
clean-gir-data:
rm -f build/GUdev-1.0.typelib
rm -f build/GUdev-1.0.gir

View File

@ -1,108 +0,0 @@
# Custom systemd Makefile include that builds/installs gudev only for LFS
# vim: tabstop=3
LIBGUDEV_SRCS = \
gudevclient.c \
gudevdevice.c \
gudevenumerator.c \
gudevenumtypes.c \
gudevmarshal.c
LIBGUDEV_INCLUDES = \
src/gudev/gudev.h \
src/gudev/gudevenums.h \
src/gudev/gudevenumtypes.h \
src/gudev/gudevtypes.h \
src/gudev/gudevclient.h \
src/gudev/gudevdevice.h \
src/gudev/gudevenumerator.h
LIBGUDEV_OBJS := $(addprefix build/, $(LIBGUDEV_SRCS:.c=.o))
LIBGUDEV_CFLAGS = \
-I src/gudev \
-D_POSIX_PTHREAD_SEMANTICS \
-D_REENTRANT \
-D_GUDEV_COMPILATION \
-DG_LOG_DOMAIN=\"GUdev\" \
-fvisibility=default \
-I /usr/include/glib-2.0 \
-I /usr/lib/glib-2.0/include
LIBGUDEV_LDFLAGS = \
-L build -L /usr/lib \
-ludev -lgobject-2.0 \
-lglib-2.0
GUDEV_GENERATED = \
src/gudev/gudevmarshal.h \
src/gudev/gudevmarshal.c \
src/gudev/gudevenumtypes.h \
src/gudev/gudevenumtypes.c
LIBGUDEV = libgudev-1.0
LIBGUDEV_MAJOR = .0
LIBGUDEV_MINOR = .1
LIBGUDEV_PATCH = .3
LIBGUDEV_SONAME := $(LIBGUDEV).so
LIBGUDEV_LINK_NAME := $(LIBGUDEV_SONAME)$(LIBGUDEV_MAJOR)
LIBGUDEV_REAL_NAME := $(LIBGUDEV_LINK_NAME)$(LIBGUDEV_MINOR)$(LIBGUDEV_PATCH)
src/gudev/gudevmarshal.h: src/gudev/gudevmarshal.list
@echo GEN $@
$(VB)glib-genmarshal $< --prefix=g_udev_marshal --header > $@
src/gudev/gudevmarshal.c: src/gudev/gudevmarshal.list
@echo GEN $@
@echo "#include \"gudevmarshal.h\"" > $@
$(VB)glib-genmarshal $< --prefix=g_udev_marshal --body >> $@
src/gudev/gudevenumtypes.h: src/gudev/gudevenumtypes.h.template src/gudev/gudevenums.h
@echo GEN $@
$(VB)glib-mkenums --template $^ > $@
src/gudev/gudevenumtypes.c: src/gudev/gudevenumtypes.c.template src/gudev/gudevenums.h
@echo GEN $@
$(VB)glib-mkenums --template $^ > $@
build/%o: src/gudev/%c $(GUDEV_GENERATED) common
@echo CC $<
$(VB)gcc -c $(LIBGUDEV_CFLAGS) $(WARN) $(OPTIONS) $(INCLUDE) $(DEF) -o $@ $<
build/$(LIBGUDEV_REAL_NAME): $(LIBGUDEV_OBJS) build/udev-local.a build/$(LIBUDEV_REAL_NAME)
@echo LINK $@
$(VB)gcc -shared -Wl,--export-dynamic -Wl,-soname,$(LIBGUDEV_LINK_NAME) \
-o build/$(LIBGUDEV_REAL_NAME) $(LIBGUDEV_OBJS) $(LIBGUDEV_LDFLAGS)
ln -sfn $(LIBGUDEV_REAL_NAME) build/$(LIBGUDEV_LINK_NAME)
ln -sfn $(LIBGUDEV_REAL_NAME) build/$(LIBGUDEV_SONAME)
build/gudev-1.0.pc: src/gudev/gudev-1.0.pc.in common
@echo GEN $@
@$(SED_PROCESS)
gudev: build/$(LIBGUDEV_REAL_NAME) build/gudev-1.0.pc
clean-gudev:
rm -f src/gudev/gudevmarshal.h
rm -f src/gudev/gudevmarshal.c
rm -f src/gudev/gudevenumtypes.h
rm -f src/gudev/gudevenumtypes.c
rm -f $(LIBGUDEV_OBJS)
rm -f build/libgudev-1.0.so*
install-gudev: gudev
@mkdir -pv $(DESTDIR)/usr/include/gudev-1.0/gudev \
$(DESTDIR)/usr/lib/pkgconfig \
$(DESTDIR)/usr/share/gtk-doc/html/gudev
@cp -v $(LIBGUDEV_INCLUDES) $(DESTDIR)/usr/include/gudev-1.0/gudev
@cp -v build/$(LIBGUDEV_REAL_NAME) $(DESTDIR)/usr/lib
@ln -svfn $(LIBGUDEV_REAL_NAME) $(DESTDIR)/usr/lib/$(LIBGUDEV_SONAME)
@ln -svfn $(LIBGUDEV_REAL_NAME) $(DESTDIR)/usr/lib/$(LIBGUDEV_LINK_NAME)
@cp -v build/gudev-1.0.pc $(DESTDIR)/usr/lib/pkgconfig
@cp -v docs/gudev/html/* $(DESTDIR)/usr/share/gtk-doc/html/gudev

View File

@ -1,54 +0,0 @@
# Custom systemd Makefile include that builds/installs keymap tool only for LFS
# vim: tabstop=3
KEYMAPS = $(shell ls keymaps/* | sort)
KEYMAPS_FR = $(shell ls keymaps-force-release/* | sort)
KEYMAP_DEPS = common src/udev/keymap/keys-from-name.h src/udev/keymap/keys-to-name.h
src/udev/keymap/keys.txt:
@echo GEN $@
$(VB)awk '/^#define.*KEY_[^ ]+[ \t]+[0-9]/ \
{ \
if ($$2 != "KEY_MAX") { print $$2 } \
}' \
/usr/include/linux/input.h | sed 's/^KEY_COFFEE$$/KEY_SCREENLOCK/' > $@
src/udev/keymap/keys-from-name.gperf: src/udev/keymap/keys.txt
@echo GEN $@
$(VB)awk 'BEGIN \
{ \
print "struct key \
{ \
const char* name; \
unsigned short id; \
};"; \
\
print "%null-strings"; print "%%"; \
} \
{ \
print $$1 ", " $$1 \
}' $< > $@
src/udev/keymap/keys-from-name.h: src/udev/keymap/keys-from-name.gperf
@echo GEN $@
$(VB)gperf -L ANSI-C -t --ignore-case -N lookup_key -H hash_key_name -p -C $< > $@
src/udev/keymap/keys-to-name.h: src/udev/keymap/keys.txt
@echo GEN $@
$(VB)awk 'BEGIN \
{ \
print "const char* const key_names[KEY_CNT] = { " \
} \
{ \
print "[" $$1 "] = \"" $$1 "\"," \
} \
END{print "};" \
}' $< > $@
keymap:
@echo "keymap is now built into udevadm/udevd"
install-keymap:
@echo "keymap is now built into udevadm/udevd"

View File

@ -1,476 +0,0 @@
'\" t
.TH "UDEV" "7" "" "systemd 202" "udev"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
udev \- Linux dynamic device management
.SH "DESCRIPTION"
.PP
udev supplies the system software with device events, manages permissions of device nodes and may create additional symlinks in the
/dev
directory, or renames network interfaces\&. The kernel usually just assigns unpredictable device names based on the order of discovery\&. Meaningful symlinks or network device names provide a way to reliably identify devices based on their properties or current configuration\&.
.PP
The udev daemon,
\fBudevd\fR(8), receives device uevents directly from the kernel whenever a device is added or removed from the system, or it changes its state\&. When udev receives a device event, it matches its configured set of rules against various device attributes to identify the device\&. Rules that match may provide additional device information to be stored in the udev database or to be used to create meaningful symlink names\&.
.PP
All device information udev processes is stored in the udev database and sent out to possible event subscribers\&. Access to all stored data and the event sources is provided by the library libudev\&.
.SH "RULES FILES"
.PP
The udev rules are read from the files located in the system rules directory
/usr/lib/udev/rules\&.d, the volatile runtime directory
/run/udev/rules\&.d
and the local administration directory
/etc/udev/rules\&.d\&. All rules files are collectively sorted and processed in lexical order, regardless of the directories in which they live\&. However, files with identical file names replace each other\&. Files in
/etc
have the highest priority, files in
/run
take precedence over files with the same name in
/lib\&. This can be used to override a system\-supplied rules file with a local file if needed; a symlink in
/etc
with the same name as a rules file in
/lib, pointing to
/dev/null, disables the rules file entirely\&.
.PP
Rule files must have the extension
\&.rules; other extensions are ignored\&.
.PP
Every line in the rules file contains at least one key\-value pair\&. Except for empty lines or lines beginning with \*(Aq#\*(Aq, which are ignored\&. There are two kinds of keys: match and assignment\&. If all match keys match against their values, the rule gets applied and the assignment keys get the specified values assigned\&.
.PP
A matching rule may rename a network interface, add symlinks pointing to the device node, or run a specified program as part of the event handling\&.
.PP
A rule consists of a comma\-separated list of one or more key\-value pairs\&. Each key has a distinct operation, depending on the used operator\&. Valid operators are:
.PP
==
.RS 4
Compare for equality\&.
.RE
.PP
!=
.RS 4
Compare for inequality\&.
.RE
.PP
=
.RS 4
Assign a value to a key\&. Keys that represent a list are reset and only this single value is assigned\&.
.RE
.PP
+=
.RS 4
Add the value to a key that holds a list of entries\&.
.RE
.PP
:=
.RS 4
Assign a value to a key finally; disallow any later changes\&.
.RE
.PP
The following key names can be used to match against device properties\&. Some of the keys also match against properties of the parent devices in sysfs, not only the device that has generated the event\&. If multiple keys that match a parent device are specified in a single rule, all these keys must match at one and the same parent device\&.
.PP
\fBACTION\fR
.RS 4
Match the name of the event action\&.
.RE
.PP
\fBDEVPATH\fR
.RS 4
Match the devpath of the event device\&.
.RE
.PP
\fBKERNEL\fR
.RS 4
Match the name of the event device\&.
.RE
.PP
\fBNAME\fR
.RS 4
Match the name of a network interface\&. It can be used once the NAME key has been set in one of the preceding rules\&.
.RE
.PP
\fBSYMLINK\fR
.RS 4
Match the name of a symlink targeting the node\&. It can be used once a SYMLINK key has been set in one of the preceding rules\&. There may be multiple symlinks; only one needs to match\&.
.RE
.PP
\fBSUBSYSTEM\fR
.RS 4
Match the subsystem of the event device\&.
.RE
.PP
\fBDRIVER\fR
.RS 4
Match the driver name of the event device\&. Only set this key for devices which are bound to a driver at the time the event is generated\&.
.RE
.PP
\fBATTR{\fR\fB\fIfilename\fR\fR\fB}\fR
.RS 4
Match sysfs attribute values of the event device\&. Trailing whitespace in the attribute values is ignored unless the specified match value itself contains trailing whitespace\&.
.RE
.PP
\fBKERNELS\fR
.RS 4
Search the devpath upwards for a matching device name\&.
.RE
.PP
\fBSUBSYSTEMS\fR
.RS 4
Search the devpath upwards for a matching device subsystem name\&.
.RE
.PP
\fBDRIVERS\fR
.RS 4
Search the devpath upwards for a matching device driver name\&.
.RE
.PP
\fBATTRS{\fR\fB\fIfilename\fR\fR\fB}\fR
.RS 4
Search the devpath upwards for a device with matching sysfs attribute values\&. If multiple
\fBATTRS\fR
matches are specified, all of them must match on the same device\&. Trailing whitespace in the attribute values is ignored unless the specified match value itself contains trailing whitespace\&.
.RE
.PP
\fBTAGS\fR
.RS 4
Search the devpath upwards for a device with matching tag\&.
.RE
.PP
\fBENV{\fR\fB\fIkey\fR\fR\fB}\fR
.RS 4
Match against a device property value\&.
.RE
.PP
\fBTAG\fR
.RS 4
Match against a device tag\&.
.RE
.PP
\fBTEST{\fR\fB\fIoctal mode mask\fR\fR\fB}\fR
.RS 4
Test the existence of a file\&. An octal mode mask can be specified if needed\&.
.RE
.PP
\fBPROGRAM\fR
.RS 4
Execute a program to determine whether there is a match; the key is true if the program returns successfully\&. The device properties are made available to the executed program in the environment\&. The program\*(Aqs stdout is available in the RESULT key\&.
.sp
This can only be used for very short\-running foreground tasks\&. For details see
\fBRUN\fR\&.
.RE
.PP
\fBRESULT\fR
.RS 4
Match the returned string of the last PROGRAM call\&. This key can be used in the same or in any later rule after a PROGRAM call\&.
.RE
.PP
Most of the fields support shell\-style pattern matching\&. The following pattern characters are supported:
.PP
*
.RS 4
Matches zero or more characters\&.
.RE
.PP
?
.RS 4
Matches any single character\&.
.RE
.PP
[]
.RS 4
Matches any single character specified within the brackets\&. For example, the pattern string \*(Aqtty[SR]\*(Aq would match either \*(AqttyS\*(Aq or \*(AqttyR\*(Aq\&. Ranges are also supported via the \*(Aq\-\*(Aq character\&. For example, to match on the range of all digits, the pattern [0\-9] could be used\&. If the first character following the \*(Aq[\*(Aq is a \*(Aq!\*(Aq, any characters not enclosed are matched\&.
.RE
.PP
The following keys can get values assigned:
.PP
\fBNAME\fR
.RS 4
The name to use for a network interface\&. The name of a device node cannot be changed by udev, only additional symlinks can be created\&.
.RE
.PP
\fBSYMLINK\fR
.RS 4
The name of a symlink targeting the node\&. Every matching rule adds this value to the list of symlinks to be created\&.
.sp
The set of characters to name a symlink is limited\&. Allowed characters are [0\-9A\-Za\-z#+\-\&.:=@_/], valid utf8 character sequences, and "\ex00" hex encoding\&. All other characters are replaced by a \*(Aq_\*(Aq character\&.
.sp
Multiple symlinks may be specified by separating the names by the space character\&. In case multiple devices claim the same name, the link always points to the device with the highest link_priority\&. If the current device goes away, the links are re\-evaluated and the device with the next highest link_priority becomes the owner of the link\&. If no link_priority is specified, the order of the devices (and which one of them owns the link) is undefined\&.
.sp
Symlink names must never conflict with the kernel\*(Aqs default device node names, as that would result in unpredictable behavior\&.
.RE
.PP
\fBOWNER\fR, \fBGROUP\fR, \fBMODE\fR
.RS 4
The permissions for the device node\&. Every specified value overrides the compiled\-in default value\&.
.RE
.PP
\fBATTR{\fR\fB\fIkey\fR\fR\fB}\fR
.RS 4
The value that should be written to a sysfs attribute of the event device\&.
.RE
.PP
\fBENV{\fR\fB\fIkey\fR\fR\fB}\fR
.RS 4
Set a device property value\&. Property names with a leading \*(Aq\&.\*(Aq are neither stored in the database nor exported to events or external tools (run by, say, the PROGRAM match key)\&.
.RE
.PP
\fBTAG\fR
.RS 4
Attach a tag to a device\&. This is used to filter events for users of libudev\*(Aqs monitor functionality, or to enumerate a group of tagged devices\&. The implementation can only work efficiently if only a few tags are attached to a device\&. It is only meant to be used in contexts with specific device filter requirements, and not as a general\-purpose flag\&. Excessive use might result in inefficient event handling\&.
.RE
.PP
\fBRUN{\fR\fB\fItype\fR\fR\fB}\fR
.RS 4
Add a program to the list of programs to be executed after processing all the rules for a specific event, depending on
type:
.PP
program
.RS 4
Execute an external program specified as the assigned value\&. If no absolute path is given, the program is expected to live in /usr/lib/udev, otherwise the absolute path must be specified\&.
.sp
This is the default if no
\fItype\fR
is specified\&.
.RE
.PP
builtin
.RS 4
As
\fBprogram\fR, but use one of the built\-in programs rather than an external one\&.
.RE
.sp
The program name and following arguments are separated by spaces\&. Single quotes can be used to specify arguments with spaces\&.
.sp
This can only be used for very short\-running foreground tasks\&. Running an event process for a long period of time may block all further events for this or a dependent device\&.
.sp
Starting daemons or other long running processes is not appropriate for udev; the forked processes, detached or not, will be unconditionally killed after the event handling has finished\&.
.RE
.PP
\fBLABEL\fR
.RS 4
A named label to which a GOTO may jump\&.
.RE
.PP
\fBGOTO\fR
.RS 4
Jumps to the next LABEL with a matching name\&.
.RE
.PP
\fBIMPORT{\fR\fB\fItype\fR\fR\fB}\fR
.RS 4
Import a set of variables as device properties, depending on
type:
.PP
program
.RS 4
Execute an external program specified as the assigned value and import its output, which must be in environment key format\&. Path specification, command/argument separation, and quoting work like in
\fBRUN\fR\&.
.RE
.PP
builtin
.RS 4
As
\fBprogram\fR, but use one of the built\-in programs rather than an external one\&.
.RE
.PP
file
.RS 4
Import a text file specified as the assigned value, the content of which must be in environment key format\&.
.RE
.PP
db
.RS 4
Import a single property specified as the assigned value from the current device database\&. This works only if the database is already populated by an earlier event\&.
.RE
.PP
cmdline
.RS 4
Import a single property from the kernel command line\&. For simple flags the value of the property is set to \*(Aq1\*(Aq\&.
.RE
.PP
parent
.RS 4
Import the stored keys from the parent device by reading the database entry of the parent device\&. The value assigned to
\fBIMPORT{parent}\fR
is used as a filter of key names to import (with the same shell\-style pattern matching used for comparisons)\&.
.RE
.sp
This can only be used for very short\-running foreground tasks\&. For details see
\fBRUN\fR\&.
.RE
.PP
\fBWAIT_FOR\fR
.RS 4
Wait for a file to become available or until a timeout of 10 seconds expires\&. The path is relative to the sysfs device; if no path is specified, this waits for an attribute to appear\&.
.RE
.PP
\fBOPTIONS\fR
.RS 4
Rule and device options:
.PP
\fBlink_priority=\fR\fB\fIvalue\fR\fR
.RS 4
Specify the priority of the created symlinks\&. Devices with higher priorities overwrite existing symlinks of other devices\&. The default is 0\&.
.RE
.PP
\fBevent_timeout=\fR
.RS 4
Number of seconds an event waits for operations to finish before giving up and terminating itself\&.
.RE
.PP
\fBstring_escape=\fR\fB\fInone|replace\fR\fR
.RS 4
Usually control and other possibly unsafe characters are replaced in strings used for device naming\&. The mode of replacement can be specified with this option\&.
.RE
.PP
\fBstatic_node=\fR
.RS 4
Apply the permissions specified in this rule to the static device node with the specified name\&. Static device node creation can be requested by kernel modules\&. These nodes might not have a corresponding kernel device at the time udevd is started; they can trigger automatic kernel module loading\&.
.RE
.PP
\fBwatch\fR
.RS 4
Watch the device node with inotify; when the node is closed after being opened for writing, a change uevent is synthesized\&.
.RE
.PP
\fBnowatch\fR
.RS 4
Disable the watching of a device node with inotify\&.
.RE
.RE
.PP
The
\fBNAME\fR,
\fBSYMLINK\fR,
\fBPROGRAM\fR,
\fBOWNER\fR,
\fBGROUP\fR,
\fBMODE\fR
and
\fBRUN\fR
fields support simple string substitutions\&. The
\fBRUN\fR
substitutions are performed after all rules have been processed, right before the program is executed, allowing for the use of device properties set by earlier matching rules\&. For all other fields, substitutions are performed while the individual rule is being processed\&. The available substitutions are:
.PP
\fB$kernel\fR, \fB%k\fR
.RS 4
The kernel name for this device\&.
.RE
.PP
\fB$number\fR, \fB%n\fR
.RS 4
The kernel number for this device\&. For example, \*(Aqsda3\*(Aq has kernel number of \*(Aq3\*(Aq
.RE
.PP
\fB$devpath\fR, \fB%p\fR
.RS 4
The devpath of the device\&.
.RE
.PP
\fB$id\fR, \fB%b\fR
.RS 4
The name of the device matched while searching the devpath upwards for
\fBSUBSYSTEMS\fR,
\fBKERNELS\fR,
\fBDRIVERS\fR
and
\fBATTRS\fR\&.
.RE
.PP
\fB$driver\fR
.RS 4
The driver name of the device matched while searching the devpath upwards for
\fBSUBSYSTEMS\fR,
\fBKERNELS\fR,
\fBDRIVERS\fR
and
\fBATTRS\fR\&.
.RE
.PP
\fB$attr{\fR\fB\fIfile\fR\fR\fB}\fR, \fB%s{\fR\fB\fIfile\fR\fR\fB}\fR
.RS 4
The value of a sysfs attribute found at the device where all keys of the rule have matched\&. If the matching device does not have such an attribute, and a previous KERNELS, SUBSYSTEMS, DRIVERS, or ATTRS test selected a parent device, then the attribute from that parent device is used\&.
.sp
If the attribute is a symlink, the last element of the symlink target is returned as the value\&.
.RE
.PP
\fB$env{\fR\fB\fIkey\fR\fR\fB}\fR, \fB%E{\fR\fB\fIkey\fR\fR\fB}\fR
.RS 4
A device property value\&.
.RE
.PP
\fB$major\fR, \fB%M\fR
.RS 4
The kernel major number for the device\&.
.RE
.PP
\fB$minor\fR, \fB%m\fR
.RS 4
The kernel minor number for the device\&.
.RE
.PP
\fB$result\fR, \fB%c\fR
.RS 4
The string returned by the external program requested with PROGRAM\&. A single part of the string, separated by a space character, may be selected by specifying the part number as an attribute:
\fB%c{N}\fR\&. If the number is followed by the \*(Aq+\*(Aq character, this part plus all remaining parts of the result string are substituted:
\fB%c{N+}\fR
.RE
.PP
\fB$parent\fR, \fB%P\fR
.RS 4
The node name of the parent device\&.
.RE
.PP
\fB$name\fR
.RS 4
The current name of the device\&. If not changed by a rule, it is the name of the kernel device\&.
.RE
.PP
\fB$links\fR
.RS 4
A space\-separated list of the current symlinks\&. The value is only set during a remove event or if an earlier rule assigned a value\&.
.RE
.PP
\fB$root\fR, \fB%r\fR
.RS 4
The udev_root value\&.
.RE
.PP
\fB$sys\fR, \fB%S\fR
.RS 4
The sysfs mount point\&.
.RE
.PP
\fB$devnode\fR, \fB%N\fR
.RS 4
The name of the device node\&.
.RE
.PP
%%
.RS 4
The \*(Aq%\*(Aq character itself\&.
.RE
.PP
$$
.RS 4
The \*(Aq$\*(Aq character itself\&.
.RE
.SH "SEE ALSO"
.PP
\fBudevd\fR(8),
\fBudevadm\fR(8)

View File

@ -1,372 +0,0 @@
'\" t
.TH "UDEVADM" "8" "" "systemd 202" "udevadm"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
udevadm \- udev management tool
.SH "SYNOPSIS"
.HP \w'\fBudevadm\fR\ 'u
\fBudevadm\fR [\fB\-\-debug\fR] [\fB\-\-version\fR] [\fB\-\-help\fR]
.HP \w'\fBudevadm\ info\ \fR\fB\fIoptions\fR\fR\ 'u
\fBudevadm info \fR\fB\fIoptions\fR\fR
.HP \w'\fBudevadm\ trigger\ \fR\fB[options]\fR\ 'u
\fBudevadm trigger \fR\fB[options]\fR
.HP \w'\fBudevadm\ settle\ \fR\fB[options]\fR\ 'u
\fBudevadm settle \fR\fB[options]\fR
.HP \w'\fBudevadm\ control\ \fR\fB\fIcommand\fR\fR\ 'u
\fBudevadm control \fR\fB\fIcommand\fR\fR
.HP \w'\fBudevadm\ monitor\ \fR\fB[options]\fR\ 'u
\fBudevadm monitor \fR\fB[options]\fR
.HP \w'\fBudevadm\ hwdb\ \fR\fB[options]\fR\ 'u
\fBudevadm hwdb \fR\fB[options]\fR
.HP \w'\fBudevadm\ test\ \fR\fB[options]\fR\fB\ \fR\fB\fIdevpath\fR\fR\ 'u
\fBudevadm test \fR\fB[options]\fR\fB \fR\fB\fIdevpath\fR\fR
.HP \w'\fBudevadm\ test\-builtin\ \fR\fB[options]\fR\fB\ \fR\fB\fIcommand\fR\fR\fB\ \fR\fB\fIdevpath\fR\fR\ 'u
\fBudevadm test\-builtin \fR\fB[options]\fR\fB \fR\fB\fIcommand\fR\fR\fB \fR\fB\fIdevpath\fR\fR
.SH "DESCRIPTION"
.PP
udevadm expects a command and command specific options\&. It controls the runtime behavior of udev, requests kernel events, manages the event queue, and provides simple debugging mechanisms\&.
.SH "OPTIONS"
.PP
\fB\-\-debug\fR
.RS 4
Print debug messages to stderr\&.
.RE
.PP
\fB\-\-version\fR
.RS 4
Print version number\&.
.RE
.PP
\fB\-\-help\fR
.RS 4
Print help text\&.
.RE
.SS "udevadm info \fIoptions\fR"
.PP
Queries the udev database for device information stored in the udev database\&. It can also query the properties of a device from its sysfs representation to help creating udev rules that match this device\&.
.PP
\fB\-\-query=\fR\fB\fItype\fR\fR
.RS 4
Query the database for specified type of device data\&. It needs the
\fB\-\-path\fR
or
\fB\-\-name\fR
to identify the specified device\&. Valid queries are:
\fBname\fR,
\fBsymlink\fR,
\fBpath\fR,
\fBproperty\fR,
\fBall\fR\&.
.RE
.PP
\fB\-\-path=\fR\fB\fIdevpath\fR\fR
.RS 4
The devpath of the device to query\&.
.RE
.PP
\fB\-\-name=\fR\fB\fIfile\fR\fR
.RS 4
The name of the device node or a symlink to query
.RE
.PP
\fB\-\-root\fR
.RS 4
Print absolute paths in
\fBname\fR
or
\fBsymlink\fR
query\&.
.RE
.PP
\fB\-\-attribute\-walk\fR
.RS 4
Print all sysfs properties of the specified device that can be used in udev rules to match the specified device\&. It prints all devices along the chain, up to the root of sysfs that can be used in udev rules\&.
.RE
.PP
\fB\-\-export\fR
.RS 4
Print output as key/value pairs\&. Values are enclosed in single quotes\&.
.RE
.PP
\fB\-\-export\-prefix=\fR\fB\fIname\fR\fR
.RS 4
Add a prefix to the key name of exported values\&.
.RE
.PP
\fB\-\-device\-id\-of\-file=\fR\fB\fIfile\fR\fR
.RS 4
Print major/minor numbers of the underlying device, where the file lives on\&.
.RE
.PP
\fB\-\-export\-db\fR
.RS 4
Export the content of the udev database\&.
.RE
.PP
\fB\-\-cleanup\-db\fR
.RS 4
Cleanup the udev database\&.
.RE
.PP
\fB\-\-version\fR
.RS 4
Print version\&.
.RE
.PP
\fB\-\-help\fR
.RS 4
Print help text\&.
.RE
.SS "udevadm trigger [options]"
.PP
Request device events from the kernel\&. Primarily used to replay events at system coldplug time\&.
.PP
\fB\-\-verbose\fR
.RS 4
Print the list of devices which will be triggered\&.
.RE
.PP
\fB\-\-dry\-run\fR
.RS 4
Do not actually trigger the event\&.
.RE
.PP
\fB\-\-type=\fR\fB\fItype\fR\fR
.RS 4
Trigger a specific type of devices\&. Valid types are:
\fBdevices\fR,
\fBsubsystems\fR\&. The default value is
\fBdevices\fR\&.
.RE
.PP
\fB\-\-action=\fR\fB\fIaction\fR\fR
.RS 4
Type of event to be triggered\&. The default value is
\fBchange\fR\&.
.RE
.PP
\fB\-\-subsystem\-match=\fR\fB\fIsubsystem\fR\fR
.RS 4
Trigger events for devices which belong to a matching subsystem\&. This option can be specified multiple times and supports shell style pattern matching\&.
.RE
.PP
\fB\-\-subsystem\-nomatch=\fR\fB\fIsubsystem\fR\fR
.RS 4
Do not trigger events for devices which belong to a matching subsystem\&. This option can be specified multiple times and supports shell style pattern matching\&.
.RE
.PP
\fB\-\-attr\-match=\fR\fB\fIattribute\fR\fR\fB=\fR\fB\fIvalue\fR\fR
.RS 4
Trigger events for devices with a matching sysfs attribute\&. If a value is specified along with the attribute name, the content of the attribute is matched against the given value using shell style pattern matching\&. If no value is specified, the existence of the sysfs attribute is checked\&. This option can be specified multiple times\&.
.RE
.PP
\fB\-\-attr\-nomatch=\fR\fB\fIattribute\fR\fR\fB=\fR\fB\fIvalue\fR\fR
.RS 4
Do not trigger events for devices with a matching sysfs attribute\&. If a value is specified along with the attribute name, the content of the attribute is matched against the given value using shell style pattern matching\&. If no value is specified, the existence of the sysfs attribute is checked\&. This option can be specified multiple times\&.
.RE
.PP
\fB\-\-property\-match=\fR\fB\fIproperty\fR\fR\fB=\fR\fB\fIvalue\fR\fR
.RS 4
Trigger events for devices with a matching property value\&. This option can be specified multiple times and supports shell style pattern matching\&.
.RE
.PP
\fB\-\-tag\-match=\fR\fB\fIproperty\fR\fR
.RS 4
Trigger events for devices with a matching tag\&. This option can be specified multiple times\&.
.RE
.PP
\fB\-\-sysname\-match=\fR\fB\fIname\fR\fR
.RS 4
Trigger events for devices with a matching sys device name\&. This option can be specified multiple times and supports shell style pattern matching\&.
.RE
.PP
\fB\-\-parent\-match=\fR\fB\fIsyspath\fR\fR
.RS 4
Trigger events for all children of a given device\&.
.RE
.SS "udevadm settle [options]"
.PP
Watches the udev event queue, and exits if all current events are handled\&.
.PP
\fB\-\-timeout=\fR\fB\fIseconds\fR\fR
.RS 4
Maximum number of seconds to wait for the event queue to become empty\&. The default value is 120 seconds\&. A value of 0 will check if the queue is empty and always return immediately\&.
.RE
.PP
\fB\-\-seq\-start=\fR\fB\fIseqnum\fR\fR
.RS 4
Wait only for events after the given sequence number\&.
.RE
.PP
\fB\-\-seq\-end=\fR\fB\fIseqnum\fR\fR
.RS 4
Wait only for events before the given sequence number\&.
.RE
.PP
\fB\-\-exit\-if\-exists=\fR\fB\fIfile\fR\fR
.RS 4
Stop waiting if file exists\&.
.RE
.PP
\fB\-\-quiet\fR
.RS 4
Do not print any output, like the remaining queue entries when reaching the timeout\&.
.RE
.PP
\fB\-\-help\fR
.RS 4
Print help text\&.
.RE
.SS "udevadm control \fIcommand\fR"
.PP
Modify the internal state of the running udev daemon\&.
.PP
\fB\-\-exit\fR
.RS 4
Signal and wait for udevd to exit\&.
.RE
.PP
\fB\-\-log\-priority=\fR\fB\fIvalue\fR\fR
.RS 4
Set the internal log level of udevd\&. Valid values are the numerical syslog priorities or their textual representations:
\fBerr\fR,
\fBinfo\fR
and
\fBdebug\fR\&.
.RE
.PP
\fB\-\-stop\-exec\-queue\fR
.RS 4
Signal udevd to stop executing new events\&. Incoming events will be queued\&.
.RE
.PP
\fB\-\-start\-exec\-queue\fR
.RS 4
Signal udevd to enable the execution of events\&.
.RE
.PP
\fB\-\-reload\fR
.RS 4
Signal udevd to reload the rules files and other databases like the kernel module index\&. Reloading rules and databases does not apply any changes to already existing devices; the new configuration will only be applied to new events\&.
.RE
.PP
\fB\-\-property=\fR\fB\fIKEY\fR\fR\fB=\fR\fB\fIvalue\fR\fR
.RS 4
Set a global property for all events\&.
.RE
.PP
\fB\-\-children\-max=\fR\fIvalue\fR
.RS 4
Set the maximum number of events, udevd will handle at the same time\&.
.RE
.PP
\fB\-\-timeout=\fR\fIseconds\fR
.RS 4
The maximum number of seconds to wait for a reply from udevd\&.
.RE
.PP
\fB\-\-help\fR
.RS 4
Print help text\&.
.RE
.SS "udevadm monitor [options]"
.PP
Listens to the kernel uevents and events sent out by a udev rule and prints the devpath of the event to the console\&. It can be used to analyze the event timing, by comparing the timestamps of the kernel uevent and the udev event\&.
.PP
\fB\-\-kernel\fR
.RS 4
Print the kernel uevents\&.
.RE
.PP
\fB\-\-udev\fR
.RS 4
Print the udev event after the rule processing\&.
.RE
.PP
\fB\-\-property\fR
.RS 4
Also print the properties of the event\&.
.RE
.PP
\fB\-\-subsystem\-match=\fR\fB\fIstring[/string]\fR\fR
.RS 4
Filter events by subsystem[/devtype]\&. Only udev events with a matching subsystem value will pass\&.
.RE
.PP
\fB\-\-tag\-match=\fR\fB\fIstring\fR\fR
.RS 4
Filter events by property\&. Only udev events with a given tag attached will pass\&.
.RE
.PP
\fB\-\-help\fR
.RS 4
Print help text\&.
.RE
.SS "udevadm hwdb [options]"
.PP
Maintain the hardware database index in
/etc/udev/hwdb\&.bin\&.
.PP
\fB\-\-update\fR
.RS 4
Compile the hardware database information located in /usr/lib/udev/hwdb\&.d/, /etc/udev/hwdb\&.d/ and store it in
/etc/udev/hwdb\&.bin\&. This should be done after any update to the source files; it will not be called automatically\&. The running udev daemon will detect a new database on its own and does not need to be notified about it\&.
.RE
.PP
\fB\-\-test=\fR\fB\fIstring\fR\fR
.RS 4
Query the database with a modalias string, and print the retrieved properties\&.
.RE
.PP
\fB\-\-root=\fR\fB\fIstring\fR\fR
.RS 4
Alternative root path in the filesystem for reading and writing files\&.
.RE
.SS "udevadm test [options] \fIdevpath\fR"
.PP
Simulate a udev event run for the given device, and print debug output\&.
.PP
\fB\-\-action=\fR\fB\fIstring\fR\fR
.RS 4
The action string\&.
.RE
.PP
\fB\-\-subsystem=\fR\fB\fIstring\fR\fR
.RS 4
The subsystem string\&.
.RE
.PP
\fB\-\-help\fR
.RS 4
Print help text\&.
.RE
.SS "udevadm test\-builtin [options] \fIcommand\fR \fIdevpath\fR"
.PP
Run a built\-in command for the given device, and print debug output\&.
.PP
\fB\-\-help\fR
.RS 4
Print help text\&.
.RE
.SH "SEE ALSO"
.PP
\fBudev\fR(7)
\fBudevd.service\fR(8)

View File

@ -1,124 +0,0 @@
'\" t
.TH "SYSTEMD\-UDEVD\&.SERVICE" "8" "" "systemd 202" "udevd"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
udevd \- Device event managing daemon
.SH "SYNOPSIS"
.HP \w'\fB/usr/lib/udevd\fR\ 'u
\fB/lib/udev/udevd\fR [\fB\-\-daemon\fR] [\fB\-\-debug\fR] [\fB\-\-children\-max=\fR] [\fB\-\-exec\-delay=\fR] [\fB\-\-resolve\-names=early|late|never\fR] [\fB\-\-version\fR] [\fB\-\-help\fR]
.SH "DESCRIPTION"
.PP
\fBudevd\fR
listens to kernel uevents\&. For every event, udevd executes matching instructions specified in udev rules\&. See
\fBudev\fR(7)\&.
.PP
The behavior of the running daemon can be changed with
\fBudevadm control\fR\&.
.SH "OPTIONS"
.PP
\fB\-\-daemon\fR
.RS 4
Detach and run in the background\&.
.RE
.PP
\fB\-\-debug\fR
.RS 4
Print debug messages to stderr\&.
.RE
.PP
\fB\-\-children\-max=\fR
.RS 4
Limit the number of events executed in parallel\&.
.RE
.PP
\fB\-\-exec\-delay=\fR
.RS 4
Delay the execution of RUN instruction by the given number of seconds\&. This option might be useful when debugging system crashes during coldplug caused by loading non\-working kernel modules\&.
.RE
.PP
\fB\-\-resolve\-names=\fR
.RS 4
Specify when udevd should resolve names of users and groups\&. When set to
\fBearly\fR
(the default) names will be resolved when the rules are parsed\&. When set to
\fBlate\fR
names will be resolved for every event\&. When set to
\fBnever\fR
names will never be resolved and all devices will be owned by root\&.
.RE
.PP
\fB\-\-version\fR
.RS 4
Print version number\&.
.RE
.PP
\fB\-\-help\fR
.RS 4
Print help text\&.
.RE
.SH "ENVIRONMENT"
.PP
\fI$UDEV_LOG=\fR
.RS 4
Set the logging priority\&.
.RE
.SH "KERNEL COMMAND LINE"
.PP
Parameters starting with "rd\&." will be read when
\fBudevd\fR
is used in an initrd\&.
.PP
\fIudev\&.log\-priority=\fR, \fIrd\&.udev\&.log\-priority=\fR
.RS 4
Set the logging priority\&.
.RE
.PP
\fIudev\&.children\-max=\fR, \fIrd\&.udev\&.children\-max=\fR
.RS 4
Limit the number of events executed in parallel\&.
.RE
.PP
\fIudev\&.exec\-delay=\fR, \fIrd\&.udev\&.exec\-delay=\fR
.RS 4
Delay the execution of RUN instruction by the given number of seconds\&. This option might be useful when debugging system crashes during coldplug caused by loading non\-working kernel modules\&.
.RE
.PP
\fInet\&.ifnames=\fR
.RS 4
Network interfaces are renamed to give them predictable names when possible\&. It is enabled by default, specifying 0 disables it\&.
.RE
.SH "CONFIGURATION FILE"
.PP
udev expects its main configuration file at
/etc/udev/udev\&.conf\&. It consists of a set of variables allowing the user to override default udev values\&. All empty lines or lines beginning with \*(Aq#\*(Aq are ignored\&. The following variables can be set:
.PP
\fIudev_log\fR
.RS 4
The logging priority\&. Valid values are the numerical syslog priorities or their textual representations:
\fBerr\fR,
\fBinfo\fR
and
\fBdebug\fR\&.
.RE
.SH "SEE ALSO"
.PP
\fBudev\fR(7),
\fBudevadm\fR(8)