-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add freebsd support #8
Comments
Hey kayrus. |
sure. I test lot of macos related stuff in freebsd. and I have to recreate freebsd VMs quite frequently. sshkeys/network configuration takes a lot of time |
Unfortunately, I didn't fork cloud-init on github and can't show you code examples, but I am planning to do this.
--- a/cloudinit/config/cc_set_passwords.py
+++ b/cloudinit/config/cc_set_passwords.py
@@ -75,8 +75,10 @@ def handle(_name, cfg, cloud, log, args):
ch_in = '\n'.join(plist_in) + '\n'
try:
- log.debug("Changing password for %s:", users)
- util.subp(['chpasswd'], ch_in)
+ log.debug("Changing password for %s: %s", users, ch_in)
+ us, pa = ch_in.split(':', 1)
+ cloud.distro.set_passwd(us, pa)
+ # util.subp(['chpasswd'], ch_in)
except Exception as e:
errors.append(e)
util.logexc(log, "Failed to set passwords with chpasswd for %s",
--- a/cloudinit/util.py
+++ b/cloudinit/util.py
@@ -1601,10 +1601,10 @@ def mount_cb(device, callback, data=None, rw=False, mtype=None, sync=True):
mountopts.append('rw')
else:
mountopts.append('ro')
- if sync:
+ #if sync:
# This seems like the safe approach to do
# (ie where this is on by default)
- mountopts.append("sync")
+ # mountopts.append("sync")
if mountopts:
mountcmd.extend(["-o", ",".join(mountopts)])
if mtype: Here are steps to install cloud-init package on FreeBSD 10:
I use static network settings in meta-data file with NoCloud and it works perfectly, renaming interface and commiting settings in /etc/rc.conf. But there is one little problem - on first boot after customizing routing does not start, so I added command |
i'll test these changes this week. |
I used cloud-init from launchpad, not from FreeBSD ports. EDIT: |
https://pellaeon.github.io/bsd-cloudinit/
The text was updated successfully, but these errors were encountered: