From bcbf7c6c9fc7d8a96b1d5c4cc9247b85fe3da2ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=81LI=20G=C3=A1bor=20J=C3=A1nos?= Date: Sun, 10 Apr 2022 18:17:21 +0200 Subject: Move towards custom packages. Change the build image process in a way that custom-built packages can be utilized. This means a simpler `Makefile` since every modification is implemented on the level of packages. Include the sources for every customized package. --- aports/openrc/machine-id.initd | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 aports/openrc/machine-id.initd (limited to 'aports/openrc/machine-id.initd') diff --git a/aports/openrc/machine-id.initd b/aports/openrc/machine-id.initd new file mode 100644 index 0000000..bdd0698 --- /dev/null +++ b/aports/openrc/machine-id.initd @@ -0,0 +1,17 @@ +#!/sbin/openrc-run + +description="Generate machine-id if needed" + +depend() { + need root dev +} + +start() { + if [ -s /etc/machine-id ] ; then + return 0 + fi + ebegin "Generating machine-id" + dd if=/dev/urandom status=none bs=16 count=1 \ + | md5sum | cut -d' ' -f1 > /etc/machine-id + eend $? +} -- cgit v1.2.3