Я пытаюсь запустить команду оболочки sed
как часть config.vm.provision
config.vm.provision "shell", inline: <<-SHELL
systemctl stop firewalld
systemctl disable firewalld
swapoff -a
sed -i '/\/swapfile/s/^/#/g' /etc/fstab
SHELL
В основном я хочу прокомментировать запись подкачки в файле /etc/fstab
.
Но я получаю сообщение об ошибке:
master: Running: inline script
master: sed: -e expression #1, char 18: unterminated `s' command
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.
Команда sed работает отлично, когда я запускаю на коробке, но выдает ошибки, когда я предоставляю ее как часть моего Vagrantfile.
Есть идеи, почему это может быть?