Fix LEAP 16.0 postInstall script

This commit is contained in:
Greg Hellings
2025-04-01 23:47:14 -05:00
parent eb27da3804
commit 46e47ec280
+3 -2
View File
@@ -59,10 +59,11 @@ local memory = agama.findByID(agama.lshw, 'memory').size;
}] }]
}, },
scripts: { scripts: {
pre: [],
post: [ { post: [ {
name: 'configure-vagrant', name: 'configure-vagrant',
chroot: true,
body: ||| body: |||
#!/bin/sh
# Configure the insecure Vagrant SSH key # Configure the insecure Vagrant SSH key
mkdir -p /home/vagrant/.ssh mkdir -p /home/vagrant/.ssh
curl -o /home/vagrant/.ssh/authorized_keys https://raw.githubusercontent.com/hashicorp/vagrant/master/keys/vagrant.pub curl -o /home/vagrant/.ssh/authorized_keys https://raw.githubusercontent.com/hashicorp/vagrant/master/keys/vagrant.pub
@@ -71,7 +72,7 @@ local memory = agama.findByID(agama.lshw, 'memory').size;
# Start services # Start services
systemctl enable sshd systemctl enable sshd
# Configure sudo access for the vagrant user # Configure sudo access for the vagrant user
cat < EOF > /etc/sudoers/sudoers.d/00_vagrant cat << EOF > /etc/sudoers.d/00_vagrant
Defaults:vagrant !requiretty Defaults:vagrant !requiretty
vagrant ALL=(ALL) NOPASSWD: ALL vagrant ALL=(ALL) NOPASSWD: ALL
root ALL=(ALL) NOPASSWD: ALL root ALL=(ALL) NOPASSWD: ALL