[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Preseed not pulling in file from network with wget



I've got the following snippet in a Debian preseed.cfg file:

d-i preseed/late_command string \
in-target mkdir --mode=700 /home/vagrant/.ssh; \
in-target chown vagrant:vagrant /home/vagrant/.ssh; \
in-target wget --no-check-certificate --output-document=/home/vagrant/.ssh/authorized_keys https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub; \
in-target chown vagrant:vagrant /home/vagrant/.ssh/authorized_keys; \
in-target chmod 0600 /home/vagrant/.ssh/authorized_keys; \

but I'm having a terrible time with the preseed not actually installing the vagrant.pub key in the .ssh directory. This works when I perform the tasks by hand from within the configured system, but the point of the exercise is to use the preseed file to "just make it happen."

Any idea what could be wrong? I find the preseed/late_commands very difficult to debug, especially when they aren't throwing any obvious errors.

On a hunch, I've checked the installer syslog, but the error makes no sense. The logs are saying that there's no such directory as /home/vagrant/.ssh, but since preseed/late_command should be running after the user has been created (along with their home directory and files from /etc/skel) and just before the installer unmounts /target, what could possibly be causing this?

--


Reply to: