mirror of
https://github.com/Maks1mS/alt-linux-vagrant-boxes.git
synced 2024-12-23 19:52:58 +03:00
try fix
This commit is contained in:
parent
6063360ded
commit
3a2ff7018a
3
.gitignore
vendored
3
.gitignore
vendored
@ -1 +1,2 @@
|
||||
iso/*.iso
|
||||
iso/*.iso
|
||||
package.box
|
@ -10,9 +10,10 @@
|
||||
("/pkg-install" action "write" lists "" auto #t)
|
||||
("/preinstall" action "write")
|
||||
("/grub" action "write" device "/dev/vda" passwd #f passwd_1 "*" passwd_2 "*")
|
||||
; настройка сетевого интерфейса на получение адреса по DHCP
|
||||
("/net-eth" action "write" reset #t)
|
||||
("/net-eth" action "write" name "eth0" configuration "dhcp")
|
||||
("/net-eth" action "write" name "ens5" ipv "4" configuration "dhcp" default "" search "" dns "" computer_name "newhost" ipv_enabled #t)
|
||||
("/net-eth" action "write" commit #t)
|
||||
("/root/change_password" language ("en_US") passwd_2 "vagrant" passwd_1 "vagrant")
|
||||
("/users/create_account" new_name "vagrant" gecos "vagrant" allow_su #t auto #f passwd_1 "vagrant" passwd_2 "vagrant" autologin #f)
|
||||
("/postinstall/laststate" script "http://server/script.sh")
|
||||
("/postinstall/laststate" script "https://raw.githubusercontent.com/Maks1mS/alt-linux-vagrant-boxes/main/alt-server-v-10/setup.sh")
|
@ -1,11 +1,13 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
a= . install2-init-functions
|
||||
|
||||
# add vagrant's public key - user can ssh without password
|
||||
mkdir -pm 700 /home/vagrant/.ssh
|
||||
curl -q -o /home/vagrant/.ssh/authorized_keys https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub
|
||||
chmod 0600 /home/vagrant/.ssh/authorized_keys
|
||||
chown -R vagrant:vagrant /home/vagrant/.ssh
|
||||
run_chroot mkdir -pm 700 /home/vagrant/.ssh
|
||||
run_chroot curl -q -o /home/vagrant/.ssh/authorized_keys https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub
|
||||
run_chroot chmod 0600 /home/vagrant/.ssh/authorized_keys
|
||||
run_chroot chown -R vagrant:vagrant /home/vagrant/.ssh
|
||||
|
||||
# give sudo access (grants all permissions to user vagrant)
|
||||
echo "vagrant ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/vagrant
|
||||
chmod 0440 /etc/sudoers.d/vagrant
|
||||
run_chroot echo "vagrant ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/vagrant
|
||||
run_chroot chmod 0440 /etc/sudoers.d/vagrant
|
Loading…
Reference in New Issue
Block a user