aboutsummaryrefslogtreecommitdiffstats
path: root/install/uname
diff options
context:
space:
mode:
Diffstat (limited to 'install/uname')
-rw-r--r--install/uname10
1 files changed, 7 insertions, 3 deletions
diff --git a/install/uname b/install/uname
index 153a646..f1eb5b3 100644
--- a/install/uname
+++ b/install/uname
@@ -1,10 +1,14 @@
#!/bin/sh
build() {
- if add_systemd_unit uname.service 2>/dev/null; then
+ if command -v add_systemd_unit >/dev/null; then
+ add_systemd_unit "uname.service"
+
# busybox provides uname, but the base hook is not prerequisite
- # for a systemd-enable initramfs - so add uname
- add_binary uname
+ # for a systemd-enable initramfs - so add uname if required
+ if [ ! -e "${BUILDROOT}/usr/bin/uname" ]; then
+ add_binary uname
+ fi
add_symlink "/usr/lib/systemd/system/sysinit.target.wants/uname.service" "../uname.service"
else