testing/shutdown-clear-machine-id: new aport

This commit is contained in:
Adam Thiede 2023-08-20 09:57:43 -05:00 committed by Kevin Daudt
parent 58cf089199
commit dbba7301bf
3 changed files with 41 additions and 0 deletions

View File

@ -0,0 +1,20 @@
# Maintainer: Adam Thiede <me@adamthiede.com>
pkgname=shutdown-clear-machine-id
pkgver=1.0.0
pkgrel=0
pkgdesc="Pre-shutdown service to remove /etc/machine-id"
url="https://wiki.alpinelinux.org/wiki/D-Bus"
arch="noarch"
license="GPL-3.0-or-later"
source="
clear-machine-id.shutdown.initd
"
install="$pkgname.post-install"
package() {
install -Dm755 "$srcdir"/clear-machine-id.shutdown.initd "$pkgdir"/etc/init.d/clear-machine-id
}
sha512sums="
5c99ced4ba1215321d8cf094d218b2d408a07c34f7bc7f20cee6886cf42d5551be1b8dad2782019e479d57f2da2c2784325cd852a37d1b9bab7d9ce72b134517 clear-machine-id.shutdown.initd
"

View File

@ -0,0 +1,8 @@
#!/sbin/openrc-run
description="Remove dbus machine-id files on shutdown"
start() {
rm -f /etc/machine-id
rm -f /var/lib/dbus/machine-id
}

View File

@ -0,0 +1,13 @@
#!/bin/sh
# Print usage instructions
cat << __EOF__
*
* To use this service, add it to the shutdown runlevel with:
*
* rc-update add clear-machine-id shutdown
*
__EOF__
exit 0