blob: 0d9f40642b14358e4e77ca2d0edf3c60451ae962 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#!/bin/bash
build() {
add_module aoe
add_udev_rule '65-aoe.rules'
add_binary "/usr/bin/aoe-discover" "/bin/aoe-discover"
add_runscript
cat >"$BUILDROOT/usr/lib/systemd/system/aoe.service" <<EOF
[Unit]
Description=AoE startup
After=systemd-modules-load.service
Before=initrd-root-device.target
DefaultDependencies=no
[Service]
Type=idle
RemainAfterExit=yes
ExecStartPre=/usr/bin/modprobe aoe
ExecStart=/hooks/aoe run_hook
EOF
cd "$BUILDROOT/usr/lib/systemd/system/sysinit.target.wants"
ln -sf ../aoe.service aoe.service
}
help() {
cat <<HELPEOF
This hook loads the necessary modules for a AoE device.
Detection will take place at runtime. To minimize the modules
in the image, add the autodetect hook too.
HELPEOF
}
# vim: set ft=sh ts=4 sw=4 et:
|