]>
git.ipfire.org Git - people/stevee/ipfire-2.x.git/blob - src/initscripts/system/udev
2 ###############################################################################
4 # IPFire.org - A linux based firewall #
5 # Copyright (C) 2007-2022 IPFire Team <info@ipfire.org> #
7 # This program is free software: you can redistribute it and/or modify #
8 # it under the terms of the GNU General Public License as published by #
9 # the Free Software Foundation, either version 3 of the License, or #
10 # (at your option) any later version. #
12 # This program is distributed in the hope that it will be useful, #
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of #
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
15 # GNU General Public License for more details. #
17 # You should have received a copy of the GNU General Public License #
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. #
20 ###############################################################################
27 boot_mesg
"Populating /dev with device nodes..."
28 if ! grep -q '[[:space:]]sysfs' /proc
/mounts
; then
30 boot_mesg
-n "FAILURE:\n\nUnable to create" ${FAILURE}
31 boot_mesg
-n " devices without a SysFS filesystem"
32 boot_mesg
-n "\n\nAfter you press Enter, this system"
33 boot_mesg
-n " will be halted and powered off."
34 boot_mesg
-n "\n\nPress Enter to continue..." ${INFO}
35 boot_mesg
"" ${NORMAL}
37 /etc
/rc.d
/init.d
/halt stop
39 if ! grep -q '[[:space:]]/dev' /proc
/mounts
; then
41 boot_mesg
-n "FAILURE:\n\nKernel has no devtmpfs/mount" ${FAILURE}
42 boot_mesg
-n " support but this is needed for udev."
43 boot_mesg
-n "\n\nAfter you press Enter, this system"
44 boot_mesg
-n " will be halted and powered off."
45 boot_mesg
-n "\n\nPress Enter to continue..." ${INFO}
46 boot_mesg
"" ${NORMAL}
48 /etc
/rc.d
/init.d
/halt stop
51 if ! grep -q '[[:space:]]/dev/shm' /proc
/mounts
; then
53 mount
-t tmpfs tmpfs
-o nosuid
,nodev
,noexec
/dev
/shm
56 if ! grep -q '[[:space:]]/dev/pts' /proc
/mounts
; then
58 mount
-t devpts devpts
-o nosuid
,noexec
,gid
=5,mode
=620 /dev
/pts
61 # Start the udev daemon to continually watch for, and act on,
63 boot_mesg
"Starting udev daemon..."
64 loadproc udevd
--daemon
66 # Now traverse /sys in order to "coldplug" devices that have
67 # already been discovered
68 /bin
/udevadm trigger
--action=add
70 # Now wait for udevd to process the uevents we triggered
76 boot_mesg
"Stopping udev daemon..."
83 echo "Usage ${0} {start}"