dev: account for non-vagrant machines on Linux config priv. (#16657)
This commit is contained in:
parent
320884b8ee
commit
28c142c1a6
|
@ -134,7 +134,7 @@ def configureLinuxProvisioners(vmCfg)
|
|||
|
||||
vmCfg.vm.provision "shell",
|
||||
privileged: true,
|
||||
path: './scripts/vagrant-linux-priv-config.sh'
|
||||
path: './scripts/linux-priv-config.sh'
|
||||
|
||||
vmCfg.vm.provision "shell",
|
||||
privileged: true,
|
||||
|
|
|
@ -49,6 +49,8 @@ hostname=$(hostname)
|
|||
sed -i -e "s/.*nomad.*/${ip} ${hostname}/" /etc/hosts
|
||||
|
||||
# Ensure we cd into the working directory on login
|
||||
if ! grep "cd /opt/gopath/src/github.com/hashicorp/nomad" /home/vagrant/.profile ; then
|
||||
echo 'cd /opt/gopath/src/github.com/hashicorp/nomad' >> /home/vagrant/.profile
|
||||
if [ -d /home/vagrant/ ] ; then
|
||||
if ! grep "cd /opt/gopath/src/github.com/hashicorp/nomad" /home/vagrant/.profile ; then
|
||||
echo 'cd /opt/gopath/src/github.com/hashicorp/nomad' >> /home/vagrant/.profile
|
||||
fi
|
||||
fi
|
|
@ -18,8 +18,8 @@ RUN useradd --create-home vagrant \
|
|||
&& echo 'vagrant ALL = (ALL) NOPASSWD: ALL' >> /etc/sudoers
|
||||
|
||||
# install priv packages
|
||||
COPY ./scripts/vagrant-linux-priv-config.sh /tmp/scripts/vagrant-linux-priv-config.sh
|
||||
RUN /tmp/scripts/vagrant-linux-priv-config.sh
|
||||
COPY ./scripts/linux-priv-config.sh /tmp/scripts/linux-priv-config.sh
|
||||
RUN /tmp/scripts/linux-priv-config.sh
|
||||
|
||||
COPY ./scripts/vagrant-linux-priv-go.sh /tmp/scripts/vagrant-linux-priv-go.sh
|
||||
RUN /tmp/scripts/vagrant-linux-priv-go.sh
|
||||
|
|
Loading…
Reference in New Issue