blob: 75bcf63fcf294b30f303ec4d268c70a26fcb03c3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#!/bin/bash
fetch_source () {
:
}
build () {
if ! which systemd >/dev/null; then
pwarning "No systemd binary found in PATH. "
perror "Make sure the system uses systemd before using this module."
fi
mkdir -p "${MODULE_BUILD_DIR}/etc/systemd/system"
for svc in kexec reboot poweroff halt; do
sed 's/umount\.target//' "${MODULE_BUILD_DIR}/lib/systemd/system/systemd-${svc}.service" \
> "${MODULE_BUILD_DIR}/etc/systemd/system/systemd-${svc}.service" \
|| perror "Could not remove umount.target from $svc"
done
}
post_copy() {
[ -d "${TARGET_BUILD_DIR}/usr/lib/systemd/system" ] \
&& ! [ -L "${TARGET_BUILD_DIR}/usr/lib/systemd/system" ] \
&& perror "/usr/lib/systemd/system must not exist in target build dir"
}
|