Skip to content

Commit

Permalink
Use short opts in machine module so it works on BSDs.
Browse files Browse the repository at this point in the history
  • Loading branch information
ladar committed Oct 2, 2023
1 parent 35f37d8 commit d37f975
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/common/machine.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
# Delete the machine-id file so a new value gets generated during subsequent reboots.

if [ -f /var/lib/dbus/machine-id ]; then
truncate --size=0 /var/lib/dbus/machine-id
truncate -s 0 /var/lib/dbus/machine-id
fi

if [ -f /etc/machine-id ]; then
truncate --size=0 /etc/machine-id
truncate -s 0 /etc/machine-id
fi

if [ -f /run/machine-id ]; then
truncate --size=0 /run/machine-id
truncate -s 0 /run/machine-id
fi

# printf "@reboot root command bash -c '/usr/bin/systemd-machine-id-setup ; rm --force /etc/cron.d/machine-id'\n" > /etc/cron.d/machine-id
Expand Down

0 comments on commit d37f975

Please sign in to comment.