#!/bin/sh -e ### BEGIN INIT INFO # Provides: udev # Required-Start: mountkernfs # Required-Stop: # Default-Start: S # Default-Stop: # Short-Description: Start systemd-udevd, populate /dev and load drivers. ### END INIT INFO # we need to unmount /dev/pts/ and remount it later over the devtmpfs proc unmount_devpts { if mountpoint -q /dev/pts/ { umount -n -l /dev/pts/ } if mountpoint -q /dev/shm/ { umount -n -l /dev/shm/ } } # mount a devtmpfs over /dev, if somebody did not already do it proc mount_devtmpfs { if grep -E -q "^[^[:space:]]+ /dev devtmpfs" /proc/mounts { mount -n -o remount,nosuid,size=$tmpfs_size,mode=0755 -t devtmpfs devtmpfs /dev return } if ! mount -n -o nosuid,size=$tmpfs_size,mode=0755 -t devtmpfs devtmpfs /dev { log_failure_msg "udev requires devtmpfs support, not started" log_end_msg 1 } return 0 } proc create_dev_makedev { if test -e /sbin/MAKEDEV { ln -sf /sbin/MAKEDEV /dev/MAKEDEV } else { ln -sf /bin/true /dev/MAKEDEV } } proc supported_kernel { matchstr $[uname -r] { 2.[012345].*|2.6.[0-9]|2.6.[0-9][!0-9]* { return 1 } 2.6.[12][0-9]|2.6.[12][0-9][!0-9]* { return 1 } 2.6.3[0-1]|2.6.3[0-1][!0-9]* { return 1 } } return 0 } # shell version of /usr/bin/tty proc my_tty { test -x /bin/readlink || return 0 test -e /proc/self/fd/0 || return 0 readlink --silent /proc/self/fd/0 || true } proc warn_if_interactive { if test $RUNLEVEL = "S" -a $PREVLEVEL = "N" { return } global TTY := $[my_tty] if test -z $TTY -o $TTY = "/dev/console" -o $TTY = "/dev/null" { return } printf "\n\n\nIt has been detected that the command\n\n\t$0 $ifsjoin(Argv)\n\n" printf "has been run from an interactive shell.\n" printf "It will probably not do what you expect, so this script will wait\n" printf "60 seconds before continuing. Press ^C to stop it.\n" printf "RUNNING THIS COMMAND IS HIGHLY DISCOURAGED!\n\n\n\n" sleep 60 } proc make_static_nodes { test -e /lib/modules/$[uname -r]/modules.devname || return 0 test -x /bin/kmod || return 0 /bin/kmod static-nodes --format=tmpfiles --output=/proc/self/fd/1 | \ while read type name mode uid gid age arg { test -e $name && continue matchstr $type { c|b|c!|b! { mknod -m $mode $name $type $[echo $arg | sed 's/:/ /] } d|d! { mkdir $name } * { echo "unparseable line ($type $name $mode $uid $gid $age $arg)" > !2 } } if test -x /sbin/restorecon { /sbin/restorecon $name } } } ############################################################################## global PATH := '"/sbin:/bin'" global NAME := '"systemd-udevd'" global DAEMON := '"/lib/systemd/systemd-udevd'" global DESC := '"the hotplug events dispatcher'" test -x $DAEMON || exit 0 # defaults global tmpfs_size := '"10M'" if test -e /etc/udev/udev.conf { source /etc/udev/udev.conf } source /lib/lsb/init-functions if ! supported_kernel { log_failure_msg "udev requires a kernel >= 2.6.32, not started" log_end_msg 1 } if test ! -e /proc/filesystems { log_failure_msg "udev requires a mounted procfs, not started" log_end_msg 1 } if ! grep -q '[[:space:]]devtmpfs$' /proc/filesystems { log_failure_msg "udev requires devtmpfs support, not started" log_end_msg 1 } if test ! -d /sys/class/ { log_failure_msg "udev requires a mounted sysfs, not started" log_end_msg 1 } if ! ps --no-headers --format args ax | egrep -q '^\[' { log_warning_msg "udev does not support containers, not started" exit 0 } if test -d /sys/class/mem/null -a ! -L /sys/class/mem/null || \ test -e /sys/block -a ! -e /sys/class/block { log_warning_msg "CONFIG_SYSFS_DEPRECATED must not be selected" log_warning_msg "Booting will continue in 30 seconds but many things will be broken" sleep 30 } # When modifying this script, do not forget that between the time that the # new /dev has been mounted and udevadm trigger has been run there will be # no /dev/null. This also means that you cannot use the "&" shell command. matchstr $1 { start { if init_is_upstart !2 >/dev/null { exit 1 } if test ! -e "/run/udev/" { warn_if_interactive } if test -w /sys/kernel/uevent_helper { echo > /sys/kernel/uevent_helper } if ! mountpoint -q /dev/ { unmount_devpts mount_devtmpfs test -d /proc/1 || mount -n /proc } make_static_nodes # clean up parts of the database created by the initramfs udev udevadm info --cleanup-db # set the SELinux context for devices created in the initramfs test -x /sbin/restorecon && /sbin/restorecon -R /dev log_daemon_msg "Starting $DESC" $NAME if $DAEMON --daemon { log_end_msg $Status } else { log_warning_msg $Status log_warning_msg "Waiting 15 seconds and trying to continue anyway" sleep 15 } log_action_begin_msg "Synthesizing the initial hotplug events" if udevadm trigger --action=add { log_action_end_msg $Status } else { log_action_end_msg $Status } create_dev_makedev # wait for the systemd-udevd childs to finish log_action_begin_msg "Waiting for /dev to be fully populated" if udevadm settle { log_action_end_msg 0 } else { log_action_end_msg 0 'timeout' } } stop { log_daemon_msg "Stopping $DESC" $NAME if start-stop-daemon --stop --name $NAME --user root --quiet --oknodo --retry 5 { log_end_msg $Status } else { log_end_msg $Status } } restart { if init_is_upstart !2 >/dev/null { exit 1 } log_daemon_msg "Stopping $DESC" $NAME if start-stop-daemon --stop --name $NAME --user root --quiet --oknodo --retry 5 { log_end_msg $Status } else { log_end_msg $Status || true } log_daemon_msg "Starting $DESC" $NAME if $DAEMON --daemon { log_end_msg $Status } else { log_end_msg $Status } } reload|force-reload { udevadm control --reload-rules } status { status_of_proc $DAEMON $NAME && exit 0 || exit $Status } * { echo "Usage: /etc/init.d/udev {start|stop|restart|reload|force-reload|status}" > !2 exit 1 } } exit 0 (CommandList children: [ (FuncDef name: unmount_devpts body: (BraceGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(mountpoint)} {(-q)} {(/dev/pts/)}) terminator: ) ] action: [(C {(umount)} {(-n)} {(-l)} {(/dev/pts/)})] spids: [-1 47] ) ] spids: [-1 59] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(mountpoint)} {(-q)} {(/dev/shm/)}) terminator: ) ] action: [(C {(umount)} {(-n)} {(-l)} {(/dev/shm/)})] spids: [-1 72] ) ] spids: [-1 84] ) ] spids: [35] ) spids: [31 34] ) (FuncDef name: mount_devtmpfs body: (BraceGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(grep)} {(-E)} {(-q)} {(DQ ("^[^[:space:]]+ /dev devtmpfs"))} {(/proc/mounts)}) terminator: ) ] action: [ (C {(mount)} {(-n)} {(-o)} {(remount) (Lit_Comma ",") (nosuid) (Lit_Comma ",") (Lit_VarLike "size=") ($ VSub_Name "$tmpfs_size") (Lit_Comma ",") (Lit_VarLike "mode=") (0755) } {(-t)} {(devtmpfs)} {(devtmpfs)} {(/dev)} ) (ControlFlow token:) ] spids: [-1 114] ) ] spids: [-1 145] ) (If arms: [ (if_arm cond: [ (Sentence child: (Pipeline children: [ (C {(mount)} {(-n)} {(-o)} {(nosuid) (Lit_Comma ",") (Lit_VarLike "size=") ($ VSub_Name "$tmpfs_size") (Lit_Comma ",") (Lit_VarLike "mode=") (0755) } {(-t)} {(devtmpfs)} {(devtmpfs)} {(/dev)} ) ] negated: True ) terminator: ) ] action: [ (C {(log_failure_msg)} {(DQ ("udev requires devtmpfs support, not started"))}) (C {(log_end_msg)} {(1)}) ] spids: [-1 176] ) ] spids: [-1 191] ) (ControlFlow token: arg_word:{(0)}) ] spids: [96] ) spids: [92 95] ) (FuncDef name: create_dev_makedev body: (BraceGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(-e)} {(/sbin/MAKEDEV)} {(Lit_Other "]")}) terminator: ) ] action: [(C {(ln)} {(-sf)} {(/sbin/MAKEDEV)} {(/dev/MAKEDEV)})] spids: [-1 220] ) ] else_action: [(C {(ln)} {(-sf)} {(/bin/true)} {(/dev/MAKEDEV)})] spids: [232 244] ) ] spids: [206] ) spids: [202 205] ) (FuncDef name: supported_kernel body: (BraceGroup children: [ (Case to_match: { (DQ (CommandSubPart command_list: (CommandList children:[(C {(uname)} {(-r)})]) left_token: spids: [259 263] ) ) } arms: [ (case_arm pat_list: [ {(2.) (Lit_Other "[") (012345) (Lit_Other "]") (.) (Lit_Other "*")} {(2.6.) (Lit_Other "[") (0-9) (Lit_Other "]")} {(2.6.) (Lit_Other "[") (0-9) (Lit_Other "]") (Lit_Other "[") (KW_Bang "!") (0-9) (Lit_Other "]") (Lit_Other "*") } ] action: [(ControlFlow token: arg_word:{(1)})] spids: [269 290 296 -1] ) (case_arm pat_list: [ {(2.6.) (Lit_Other "[") (12) (Lit_Other "]") (Lit_Other "[") (0-9) (Lit_Other "]")} {(2.6.) (Lit_Other "[") (12) (Lit_Other "]") (Lit_Other "[") (0-9) (Lit_Other "]") (Lit_Other "[") (KW_Bang "!") (0-9) (Lit_Other "]") (Lit_Other "*") } ] action: [(ControlFlow token: arg_word:{(1)})] spids: [299 319 325 -1] ) (case_arm pat_list: [ {(2.6.3) (Lit_Other "[") (0-1) (Lit_Other "]")} {(2.6.3) (Lit_Other "[") (0-1) (Lit_Other "]") (Lit_Other "[") (KW_Bang "!") (0-9) (Lit_Other "]") (Lit_Other "*") } ] action: [(ControlFlow token: arg_word:{(1)})] spids: [328 342 348 -1] ) ] spids: [256 266 351] ) (ControlFlow token: arg_word:{(0)}) ] spids: [253] ) spids: [249 252] ) (FuncDef name: my_tty body: (BraceGroup children: [ (AndOr children: [ (C {(Lit_Other "[")} {(-x)} {(/bin/readlink)} {(Lit_Other "]")}) (ControlFlow token: arg_word:{(0)}) ] op_id: Op_DPipe ) (AndOr children: [ (C {(Lit_Other "[")} {(-e)} {(/proc/self/fd/0)} {(Lit_Other "]")}) (ControlFlow token: arg_word:{(0)}) ] op_id: Op_DPipe ) (AndOr children: [(C {(readlink)} {(--silent)} {(/proc/self/fd/0)}) (C {(true)})] op_id: Op_DPipe ) ] spids: [368] ) spids: [364 367] ) (FuncDef name: warn_if_interactive body: (BraceGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$RUNLEVEL"))} {(Lit_Other "=")} {(DQ (S))} {(-a)} {(DQ ($ VSub_Name "$PREVLEVEL"))} {(Lit_Other "=")} {(DQ (N))} {(Lit_Other "]")} ) terminator: ) ] action: [(ControlFlow token:)] spids: [-1 450] ) ] spids: [-1 456] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:TTY) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(my_tty)})]) left_token: spids: [461 463] ) } spids: [460] ) ] spids: [460] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(-z)} {(DQ ($ VSub_Name "$TTY"))} {(-o)} {(DQ ($ VSub_Name "$TTY"))} {(Lit_Other "=")} {(DQ (/dev/console))} {(-o)} {(DQ ($ VSub_Name "$TTY"))} {(Lit_Other "=")} {(DQ (/dev/null))} {(Lit_Other "]")} ) terminator: ) ] action: [(ControlFlow token:)] spids: [-1 503] ) ] spids: [-1 509] ) (C {(printf)} { (DQ (EscapedLiteralPart token:) (EscapedLiteralPart token:) (EscapedLiteralPart token:) ("It has been detected that the command") (EscapedLiteralPart token:) (EscapedLiteralPart token:) (EscapedLiteralPart token:) ($ VSub_Number "$0") (" ") ($ VSub_Star "$*") (EscapedLiteralPart token:) (EscapedLiteralPart token:) ) } ) (C {(printf)} { (DQ ("has been run from an interactive shell.") (EscapedLiteralPart token:) ) } ) (C {(printf)} { (DQ ("It will probably not do what you expect, so this script will wait") (EscapedLiteralPart token:) ) } ) (C {(printf)} { (DQ ("60 seconds before continuing. Press ^C to stop it.") (EscapedLiteralPart token:) ) } ) (C {(printf)} { (DQ ("RUNNING THIS COMMAND IS HIGHLY DISCOURAGED!") (EscapedLiteralPart token:) (EscapedLiteralPart token:) (EscapedLiteralPart token:) (EscapedLiteralPart token:) ) } ) (C {(sleep)} {(60)}) ] spids: [418] ) spids: [414 417] ) (FuncDef name: make_static_nodes body: (BraceGroup children: [ (AndOr children: [ (C {(Lit_Other "[")} {(-e)} {(/lib/modules/) (CommandSubPart command_list: (CommandList children:[(C {(uname)} {(-r)})]) left_token: spids: [585 589] ) (/modules.devname) } {(Lit_Other "]")} ) (ControlFlow token: arg_word:{(0)}) ] op_id: Op_DPipe ) (AndOr children: [ (C {(Lit_Other "[")} {(-x)} {(/bin/kmod)} {(Lit_Other "]")}) (ControlFlow token: arg_word:{(0)}) ] op_id: Op_DPipe ) (Pipeline children: [ (C {(/bin/kmod)} {(static-nodes)} {(--format) (Lit_Other "=") (tmpfiles)} {(--output) (Lit_Other "=") (/proc/self/fd/1)} ) (While cond: [ (Sentence child: (C {(read)} {(type)} {(name)} {(mode)} {(uid)} {(gid)} {(age)} {(arg)}) terminator: ) ] body: (DoGroup children: [ (AndOr children: [ (C {(Lit_Other "[")} {(-e)} {($ VSub_Name "$name")} {(Lit_Other "]")}) (ControlFlow token: ) ] op_id: Op_DAmp ) (Case to_match: {(DQ ($ VSub_Name "$type"))} arms: [ (case_arm pat_list: [{(c)} {(b)} {(c) (KW_Bang "!")} {(b) (KW_Bang "!")}] action: [ (C {(mknod)} {(-m)} {($ VSub_Name "$mode")} {($ VSub_Name "$name")} {($ VSub_Name "$type")} { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {($ VSub_Name "$arg")}) (C {(sed)} {(SQ <"s/:/ /">)}) ] negated: False ) ] ) left_token: spids: [698 710] ) } ) ] spids: [677 686 712 -1] ) (case_arm pat_list: [{(d)} {(d) (KW_Bang "!")}] action: [(C {(mkdir)} {($ VSub_Name "$name")})] spids: [715 719 725 -1] ) (case_arm pat_list: [{(Lit_Other "*")}] action: [ (SimpleCommand words: [ {(echo)} { (DQ ("unparseable line (") ($ VSub_Name "$type") (" ") ($ VSub_Name "$name") (" ") ($ VSub_Name "$mode") (" ") ($ VSub_Name "$uid") (" ") ($ VSub_Name "$gid") (" ") ($ VSub_Name "$age") (" ") ($ VSub_Name "$arg") (")") ) } ] redirects: [ (Redir op_id: Redir_GreatAnd fd: -1 arg_word: {(2)} spids: [751] ) ] ) ] spids: [728 729 754 -1] ) ] spids: [668 674 757] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(-x)} {(/sbin/restorecon)} {(Lit_Other "]")}) terminator: ) ] action: [(C {(/sbin/restorecon)} {($ VSub_Name "$name")})] spids: [-1 772] ) ] spids: [-1 780] ) ] spids: [652 783] ) ) ] negated: False ) ] spids: [577] ) spids: [573 576] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:PATH) op:Equal rhs:{(DQ ("/sbin:/bin"))} spids:[793])] spids: [793] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:NAME) op:Equal rhs:{(DQ (systemd-udevd))} spids:[798])] spids: [798] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:DAEMON) op: Equal rhs: {(DQ (/lib/systemd/systemd-udevd))} spids: [803] ) ] spids: [803] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:DESC) op: Equal rhs: {(DQ ("the hotplug events dispatcher"))} spids: [808] ) ] spids: [808] ) (AndOr children: [ (C {(Lit_Other "[")} {(-x)} {($ VSub_Name "$DAEMON")} {(Lit_Other "]")}) (C {(exit)} {(0)}) ] op_id: Op_DPipe ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:tmpfs_size) op:Equal rhs:{(DQ (10M))} spids:[832])] spids: [832] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(-e)} {(/etc/udev/udev.conf)} {(Lit_Other "]")}) terminator: ) ] action: [(C {(.)} {(/etc/udev/udev.conf)})] spids: [-1 849] ) ] spids: [-1 856] ) (C {(.)} {(/lib/lsb/init-functions)}) (If arms: [ (if_arm cond: [ (Sentence child: (Pipeline children:[(C {(supported_kernel)})] negated:True) terminator: ) ] action: [ (C {(log_failure_msg)} {(DQ ("udev requires a kernel >= 2.6.32, not started"))}) (C {(log_end_msg)} {(1)}) ] spids: [-1 871] ) ] spids: [-1 885] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(KW_Bang "!")} {(-e)} {(/proc/filesystems)} {(Lit_Other "]")}) terminator: ) ] action: [ (C {(log_failure_msg)} {(DQ ("udev requires a mounted procfs, not started"))}) (C {(log_end_msg)} {(1)}) ] spids: [-1 901] ) ] spids: [-1 915] ) (If arms: [ (if_arm cond: [ (Sentence child: (Pipeline children: [(C {(grep)} {(-q)} {(SQ <"[[:space:]]devtmpfs$">)} {(/proc/filesystems)})] negated: True ) terminator: ) ] action: [ (C {(log_failure_msg)} {(DQ ("udev requires devtmpfs support, not started"))}) (C {(log_end_msg)} {(1)}) ] spids: [-1 933] ) ] spids: [-1 947] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(KW_Bang "!")} {(-d)} {(/sys/class/)} {(Lit_Other "]")}) terminator: ) ] action: [ (C {(log_failure_msg)} {(DQ ("udev requires a mounted sysfs, not started"))}) (C {(log_end_msg)} {(1)}) ] spids: [-1 963] ) ] spids: [-1 977] ) (If arms: [ (if_arm cond: [ (Sentence child: (Pipeline children: [ (C {(ps)} {(--no-headers)} {(--format)} {(args)} {(ax)}) (C {(egrep)} {(-q)} {(SQ <"^\\[">)}) ] negated: True ) terminator: ) ] action: [ (C {(log_warning_msg)} {(DQ ("udev does not support containers, not started"))}) (C {(exit)} {(0)}) ] spids: [-1 1005] ) ] spids: [-1 1019] ) (If arms: [ (if_arm cond: [ (Sentence child: (AndOr children: [ (C {(Lit_Other "[")} {(-d)} {(/sys/class/mem/null)} {(-a)} {(KW_Bang "!")} {(-L)} {(/sys/class/mem/null)} {(Lit_Other "]")} ) (C {(Lit_Other "[")} {(-e)} {(/sys/block)} {(-a)} {(KW_Bang "!")} {(-e)} {(/sys/class/block)} {(Lit_Other "]")} ) ] op_id: Op_DPipe ) terminator: ) ] action: [ (C {(log_warning_msg)} {(DQ ("CONFIG_SYSFS_DEPRECATED must not be selected"))}) (C {(log_warning_msg)} {(DQ ("Booting will continue in 30 seconds but many things will be broken"))} ) (C {(sleep)} {(30)}) ] spids: [-1 1061] ) ] spids: [-1 1082] ) (Case to_match: {(DQ ($ VSub_Number "$1"))} arms: [ (case_arm pat_list: [{(start)}] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (SimpleCommand words: [{(init_is_upstart)}] redirects: [ (Redir op_id: Redir_Great fd: 2 arg_word: {(/dev/null)} spids: [1112] ) ] ) terminator: ) ] action: [(C {(exit)} {(1)})] spids: [-1 1116] ) ] spids: [-1 1124] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(KW_Bang "!")} {(-e)} {(DQ (/run/udev/))} {(Lit_Other "]")}) terminator: ) ] action: [(C {(warn_if_interactive)})] spids: [-1 1143] ) ] spids: [-1 1149] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(-w)} {(/sys/kernel/uevent_helper)} {(Lit_Other "]")}) terminator: ) ] action: [ (SimpleCommand words: [{(echo)}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(/sys/kernel/uevent_helper)} spids: [1169] ) ] ) ] spids: [-1 1164] ) ] spids: [-1 1174] ) (If arms: [ (if_arm cond: [ (Sentence child: (Pipeline children:[(C {(mountpoint)} {(-q)} {(/dev/)})] negated:True) terminator: ) ] action: [ (C {(unmount_devpts)}) (C {(mount_devtmpfs)}) (AndOr children: [ (C {(Lit_Other "[")} {(-d)} {(/proc/1)} {(Lit_Other "]")}) (C {(mount)} {(-n)} {(/proc)}) ] op_id: Op_DPipe ) ] spids: [-1 1189] ) ] spids: [-1 1215] ) (C {(make_static_nodes)}) (C {(udevadm)} {(info)} {(--cleanup-db)}) (AndOr children: [ (C {(Lit_Other "[")} {(-x)} {(/sbin/restorecon)} {(Lit_Other "]")}) (C {(/sbin/restorecon)} {(-R)} {(/dev)}) ] op_id: Op_DAmp ) (C {(log_daemon_msg)} {(DQ ("Starting ") ($ VSub_Name "$DESC"))} {(DQ ($ VSub_Name "$NAME"))}) (If arms: [ (if_arm cond: [ (Sentence child: (C {($ VSub_Name "$DAEMON")} {(--daemon)}) terminator: ) ] action: [(C {(log_end_msg)} {($ VSub_QMark "$?")})] spids: [-1 1276] ) ] else_action: [ (C {(log_warning_msg)} {($ VSub_QMark "$?")}) (C {(log_warning_msg)} {(DQ ("Waiting 15 seconds and trying to continue anyway"))}) (C {(sleep)} {(15)}) ] spids: [1284 1304] ) (C {(log_action_begin_msg)} {(DQ ("Synthesizing the initial hotplug events"))}) (If arms: [ (if_arm cond: [ (Sentence child: (C {(udevadm)} {(trigger)} {(--action) (Lit_Other "=") (add)}) terminator: ) ] action: [(C {(log_action_end_msg)} {($ VSub_QMark "$?")})] spids: [-1 1326] ) ] else_action: [(C {(log_action_end_msg)} {($ VSub_QMark "$?")})] spids: [1334 1342] ) (C {(create_dev_makedev)}) (C {(log_action_begin_msg)} {(DQ ("Waiting for /dev to be fully populated"))}) (If arms: [ (if_arm cond: [(Sentence child:(C {(udevadm)} {(settle)}) terminator:)] action: [(C {(log_action_end_msg)} {(0)})] spids: [-1 1368] ) ] else_action: [(C {(log_action_end_msg)} {(0)} {(SQ )})] spids: [1376 1388] ) ] spids: [1104 1105 1391 -1] ) (case_arm pat_list: [{(stop)}] action: [ (C {(log_daemon_msg)} {(DQ ("Stopping ") ($ VSub_Name "$DESC"))} {(DQ ($ VSub_Name "$NAME"))}) (If arms: [ (if_arm cond: [ (Sentence child: (C {(start-stop-daemon)} {(--stop)} {(--name)} {($ VSub_Name "$NAME")} {(--user)} {(root)} {(--quiet)} {(--oknodo)} {(--retry)} {(5)} ) terminator: ) ] action: [(C {(log_end_msg)} {($ VSub_QMark "$?")})] spids: [-1 1434] ) ] else_action: [(C {(log_end_msg)} {($ VSub_QMark "$?")})] spids: [1442 1450] ) ] spids: [1395 1396 1453 -1] ) (case_arm pat_list: [{(restart)}] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (SimpleCommand words: [{(init_is_upstart)}] redirects: [ (Redir op_id: Redir_Great fd: 2 arg_word: {(/dev/null)} spids: [1465] ) ] ) terminator: ) ] action: [(C {(exit)} {(1)})] spids: [-1 1469] ) ] spids: [-1 1477] ) (C {(log_daemon_msg)} {(DQ ("Stopping ") ($ VSub_Name "$DESC"))} {(DQ ($ VSub_Name "$NAME"))}) (If arms: [ (if_arm cond: [ (Sentence child: (C {(start-stop-daemon)} {(--stop)} {(--name)} {($ VSub_Name "$NAME")} {(--user)} {(root)} {(--quiet)} {(--oknodo)} {(--retry)} {(5)} ) terminator: ) ] action: [(C {(log_end_msg)} {($ VSub_QMark "$?")})] spids: [-1 1515] ) ] else_action: [ (AndOr children: [(C {(log_end_msg)} {($ VSub_QMark "$?")}) (C {(true)})] op_id: Op_DPipe ) ] spids: [1523 1535] ) (C {(log_daemon_msg)} {(DQ ("Starting ") ($ VSub_Name "$DESC"))} {(DQ ($ VSub_Name "$NAME"))}) (If arms: [ (if_arm cond: [ (Sentence child: (C {($ VSub_Name "$DAEMON")} {(--daemon)}) terminator: ) ] action: [(C {(log_end_msg)} {($ VSub_QMark "$?")})] spids: [-1 1558] ) ] else_action: [(C {(log_end_msg)} {($ VSub_QMark "$?")})] spids: [1566 1574] ) ] spids: [1457 1458 1577 -1] ) (case_arm pat_list: [{(reload)} {(force-reload)}] action: [(C {(udevadm)} {(control)} {(--reload-rules)})] spids: [1581 1584 1594 -1] ) (case_arm pat_list: [{(status)}] action: [ (AndOr children: [ (C {(status_of_proc)} {($ VSub_Name "$DAEMON")} {($ VSub_Name "$NAME")}) (AndOr children: [(C {(exit)} {(0)}) (C {(exit)} {($ VSub_QMark "$?")})] op_id: Op_DPipe ) ] op_id: Op_DAmp ) ] spids: [1598 1599 1621 -1] ) (case_arm pat_list: [{(Lit_Other "*")}] action: [ (SimpleCommand words: [ {(echo)} {(DQ ("Usage: /etc/init.d/udev {start|stop|restart|reload|force-reload|status}"))} ] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[1635])] ) (C {(exit)} {(1)}) ] spids: [1625 1626 1644 -1] ) ] spids: [1095 1101 1646] ) (C {(exit)} {(0)}) ] )