Lines 51-98
Link Here
|
51 |
HALDAEMON_GROUPS_LINUX="haldaemon,plugdev,disk,cdrom,cdrw,floppy,usb" |
51 |
HALDAEMON_GROUPS_LINUX="haldaemon,plugdev,disk,cdrom,cdrw,floppy,usb" |
52 |
HALDAEMON_GROUPS_FREEBSD="haldaemon,plugdev,operator" |
52 |
HALDAEMON_GROUPS_FREEBSD="haldaemon,plugdev,operator" |
53 |
|
53 |
|
54 |
function notify_uevent() { |
54 |
uevent_check() { |
55 |
ewarn |
55 |
local CONFIG_CHECK="~HOTPLUG ~NET" |
56 |
ewarn "You must enable Kernel Userspace Events in your kernel." |
56 |
local WARNING_HOTPLUG="CONFIG_HOTPLUG:\tis not set (required for HAL)" |
57 |
ewarn "For this you need to enable 'Hotplug' under 'General Setup' and" |
57 |
local WARNING_NET="CONFIG_NET:\tis not set (required for HAL)" |
58 |
ewarn "basic networking. They are marked CONFIG_HOTPLUG and CONFIG_NET" |
58 |
check_extra_config |
59 |
ewarn "in the config file." |
59 |
echo |
60 |
ewarn |
60 |
} |
61 |
ebeep 5 |
61 |
|
62 |
} |
62 |
procfs_check() { |
63 |
|
63 |
local CONFIG_CHECK="~PROC_FS" |
64 |
function notify_procfs() { |
64 |
local WARNING_PROC_FS="CONFIG_PROC_FS:\tis not set (required for HAL)" |
65 |
ewarn |
65 |
check_extra_config |
66 |
ewarn "You must enable the proc filesystem in your kernel." |
66 |
echo |
67 |
ewarn "For this you need to enable '/proc file system support' under" |
67 |
} |
68 |
ewarn "'Pseudo filesystems' in 'File systems'. It is marked" |
68 |
|
69 |
ewarn "CONFIG_PROC_FS in the config file." |
69 |
inotify_check() { |
70 |
ewarn |
70 |
local CONFIG_CHECK="~INOTIFY_USER" |
71 |
ebeep 5 |
71 |
local WARNING_INOTIFY_USER="CONFIG_INOTIFY_USER:\tis not set (required for HAL)" |
72 |
} |
72 |
check_extra_config |
73 |
|
73 |
echo |
74 |
function notify_inotify() { |
|
|
75 |
ewarn |
76 |
ewarn "You must enable the Inotify system in your kernel." |
77 |
ewarn "For this you need to enable 'Inotify support for userspace'" |
78 |
ewarn "in 'File systems'. It is marked CONFIG_INOTIFY_USER in the config file." |
79 |
ewarn |
80 |
ebeep 5 |
81 |
} |
74 |
} |
82 |
|
75 |
|
83 |
pkg_setup() { |
76 |
pkg_setup() { |
84 |
if use kernel_linux; then |
77 |
if use kernel_linux; then |
85 |
kernel_is ge 2 6 17 || ewarn "HAL requires a kernel version 2.6.17 or newer" |
78 |
uevent_check |
86 |
|
79 |
inotify_check |
87 |
if ! ( linux_chkconfig_present HOTPLUG && linux_chkconfig_present NET ) |
80 |
use acpi && procfs_check |
|
|
81 |
if [ -e /usr/src/linux/.config ] |
88 |
then |
82 |
then |
89 |
notify_uevent |
83 |
kernel_is ge 2 6 17 || \ |
90 |
fi |
84 |
ewarn "HAL requires a kernel version 2.6.17 or newer" |
91 |
|
|
|
92 |
linux_chkconfig_present INOTIFY_USER || notify_inotify |
93 |
|
94 |
if use acpi ; then |
95 |
linux_chkconfig_present PROC_FS || notify_procfs |
96 |
fi |
85 |
fi |
97 |
fi |
86 |
fi |
98 |
|
87 |
|