mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 12:48:22 +00:00
21 lines
465 B
Plaintext
Executable File
21 lines
465 B
Plaintext
Executable File
if [ ! -f "/var/lib/.first_boot_done" ] ; then
|
|
if [ ! -s /etc/machine-id ]; then
|
|
machine_id=$(od -An -N16 -tx1 /dev/urandom | tr -d ' \n')
|
|
if [ "${#machine_id}" -ne 32 ]; then
|
|
echo "Failed to generate /etc/machine-id" >&2
|
|
exit 1
|
|
fi
|
|
|
|
printf '%s\n' "$machine_id" > /etc/machine-id
|
|
chmod 444 /etc/machine-id
|
|
fi
|
|
|
|
mkdir -p /var/log
|
|
xbps-reconfigure -a > /var/log/first_install_reconfigure.log
|
|
|
|
# all done
|
|
touch /var/lib/.first_boot_done
|
|
fi
|
|
|
|
exit 0
|