diff options
author | Your Name | 2022-10-25 23:56:09 +0300 |
---|---|---|
committer | Your Name | 2022-10-25 23:56:09 +0300 |
commit | 4f1956668b9747de011a4a80331d96a4e2a1eec1 (patch) | |
tree | 09a9b139ba8ea39c633f6ad0b5258cbbccd1f3b7 | |
download | aur-4f1956668b9747de011a4a80331d96a4e2a1eec1.tar.gz |
initial commit
-rw-r--r-- | .SRCINFO | 9 | ||||
-rw-r--r-- | PKGBUILD | 16 | ||||
-rw-r--r-- | random_machine_id.service | 10 | ||||
-rw-r--r-- | random_machine_id.sh | 5 |
4 files changed, 40 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..8594440bba3b --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,9 @@ +pkgbase = random_machine_id + pkgdesc = generate new /etc/machine-id on boot + pkgver = 1 + pkgrel = 1 + arch = any + license = GPL + depends = systemd + +pkgname = random_machine_id diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..dff817f7d25e --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,16 @@ +# Maintainer: Your Name <youremail@domain.com> +pkgname=random_machine_id +pkgver=1 +pkgrel=1 +pkgdesc="generate new /etc/machine-id on boot" +arch=(any) +url="" +license=('GPL') +depends=(systemd) + +package() { + install -Dm755 "../$pkgname.sh" "$pkgdir/usr/bin/$pkgname.sh" + install -Dm0644 "../$pkgname.service" "$pkgdir/etc/systemd/system/$pkgname.service" + + echo "enable service via #systemctl enable --now random_machine_id.service" +} diff --git a/random_machine_id.service b/random_machine_id.service new file mode 100644 index 000000000000..ea678ebe380e --- /dev/null +++ b/random_machine_id.service @@ -0,0 +1,10 @@ +[Unit] +Description=Change /etc/machine-id on boot + +[Service] +Type=simple +ExecStart=/bin/bash /usr/sbin/random_machine_id.sh + +[Install] +WantedBy=multi-user.target + diff --git a/random_machine_id.sh b/random_machine_id.sh new file mode 100644 index 000000000000..6ca66bf6e887 --- /dev/null +++ b/random_machine_id.sh @@ -0,0 +1,5 @@ +#!/bin/sh + if [ -f /etc/machine-id ]; then + rm /etc/machine-id && \ + systemd-machine-id-setup + fi |