#!/bin/sh

build() {
	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 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
		add_runscript
	fi
}

help() {
	echo "This hook adds an uname output to the boot process."
}