I've got an installation dilemma.
I'm trying to build a vagrant box with Artix dinit using packer.
Packer wants to have SSH turned on for the virtual disk at boot or it won't be running scripts.
I get the feeling dinit is designed to need a reboot before one can enable a service,
but I need to enable a service before dinit starts at boot.
How do I solve this chicken and egg problem?
dinitctl before reboot/usr/bin/ls: cannot access '/run/dinitctl': No such file or directory
ln -sf /etc/dinit.d/$svc /etc/dinit.d/boot.d/
Uhmm... I have
echo "==> setup.sh: Enable ssh access manually for box.."
/usr/bin/artix-chroot /mnt ln -s /etc/dinit.d/sshd /etc/dinit.d/boot.d/sshd
/usr/bin/install --owner=root --group=root --mode=0644 etc/dinit.d/sshd /mnt /etc/dinit.d/sshd
/usr/bin/install --owner=root --group=root ${INIT_DIR}/scripts/sshd /mnt /etc/dinit.d/scripts/sshd
This works.
I'm not sure what $svc is, but my above code works.
(I need to run all commands using artix-chroot directly due to packer.)
Unfortunately, I seem to have another issue with packer. :(
There shouldn't be a space between "/mnt" and the filename that follows it, though, right? If that space is really there, I don't see how that works