#
667ef887 |
| 05-Jul-2025 |
Mark Johnston <markj@FreeBSD.org> |
nuageinit: Add wrappers for chmod and chown
In the wrappers, check for errors and abort if one is raised. At some point it may be useful to have a mechanism to ignore errors, but I'm not sure yet h
nuageinit: Add wrappers for chmod and chown
In the wrappers, check for errors and abort if one is raised. At some point it may be useful to have a mechanism to ignore errors, but I'm not sure yet how that should look.
For chmod, let the mode be specified as an octal number, otherwise it's hard to understand what's happening. Note that this must be specified as a string, otherwise tonumber() will raise an error.
Reviewed by: bapt MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D51159
show more ...
|
#
b56d2195 |
| 26-Jun-2025 |
Baptiste Daroussin <bapt@FreeBSD.org> |
nuageinit: enhance sudo support
from the cloudinit specification sudo rules can be a string or an array of string
|
#
3969965c |
| 26-Jun-2025 |
Baptiste Daroussin <bapt@FreeBSD.org> |
nuageinit: fix setting owner when only the user is set
|
#
d9a4c24d |
| 26-Jun-2025 |
Baptiste Daroussin <bapt@FreeBSD.org> |
nuageinit: write_files fix typo breaking tests
|
#
19a7ea3c |
| 26-Jun-2025 |
Baptiste Daroussin <bapt@FreeBSD.org> |
nuageinit: implement write_files
write_files is a list of files that should be created at the first boot
each file content can be either plain text or encoded in base64 (note that cloudinit specify
nuageinit: implement write_files
write_files is a list of files that should be created at the first boot
each file content can be either plain text or encoded in base64 (note that cloudinit specify that gzip is supported, but we do not support it yet.)
All other specifier from cloudinit should work: by default all files will juste overwrite exesiting files except if "append" is set to true, permissions, ownership can be specified. The files are create before packages are being installed and user created.
if "defer" is set to true then the file is being created after packages installation and package manupulation.
This feature is requested for KDE's CI.
show more ...
|
#
6a54f886 |
| 15-Jun-2025 |
Baptiste Daroussin <bapt@FreeBSD.org> |
nuageinit: add support for sudo
|
#
682af960 |
| 06-Jun-2025 |
Sebastien Baylocq <sebastien.baylocq@ovhcloud.com> |
nuageinit: more package related functions
Implement package_update and package_upgrade, which allows to launch an update of the metadata and an upgrade of the packages.
Sponsored by: OVHCloud
|
#
076fec1b |
| 06-Jun-2025 |
Sebastien Baylocq <sebastien.baylocq@ovhcloud.com> |
nuageinit: implement packages
Installs a list of packages
Sponsored by: OVHCloud
|
#
43b82d69 |
| 06-Jun-2025 |
Sebastien Baylocq <sebastien.baylocq@ovhcloud.com> |
nuageinit: add a function to bootstrap pkg if needed
Sponsored by: OVHCloud
|
Revision tags: release/14.3.0 |
|
#
c201a119 |
| 25-Apr-2025 |
Baptiste Daroussin <bapt@FreeBSD.org> |
nuageinit: implement chpasswd
Add support for chpasswd, with all possible syntaxes, including deprecated one: chpasswd.list as a list or as a multiline string as some providers are still only provid
nuageinit: implement chpasswd
Add support for chpasswd, with all possible syntaxes, including deprecated one: chpasswd.list as a list or as a multiline string as some providers are still only providing this deprecated form
Sponsored by: OVHCloud MFC After: 1 week Reviewed by: kevans, jlduran Differential Revision: https://reviews.freebsd.org/D50021
show more ...
|
#
18d74dc0 |
| 23-Apr-2025 |
Baptiste Daroussin <bapt@FreeBSD.org> |
nuageinit: fix luacheck nit
Reported by: jlduran
|
#
f85d0868 |
| 17-Apr-2025 |
Baptiste Daroussin <bapt@FreeBSD.org> |
nuageinint: implement ssh_pwauth
ssh_pwauth sets the value in sshd_config for the password authentication This implementation tries to avoid touching the file if cloudinit request for what is alread
nuageinint: implement ssh_pwauth
ssh_pwauth sets the value in sshd_config for the password authentication This implementation tries to avoid touching the file if cloudinit request for what is already the default value.
MFC After: 3 days Sponsored by: OVHCloud Reviewed by: kevans, jlduran Differential Revision: https://reviews.freebsd.org/D49875
show more ...
|
Revision tags: release/13.4.0-p5, release/13.5.0-p1, release/14.2.0-p3, release/13.5.0, release/14.2.0-p2, release/14.1.0-p8, release/13.4.0-p4, release/14.1.0-p7, release/14.2.0-p1, release/13.4.0-p3, release/14.2.0 |
|
#
3e502866 |
| 20-Nov-2024 |
Baptiste Daroussin <bapt@FreeBSD.org> |
nuageinit: use io.popen instead of pipes in shell for password
using echo in a sh(1) command line, requires many escaping to be done right, using io.popen we don't need to do this escaping anymore.
|
Revision tags: release/13.4.0 |
|
#
b9ce743c |
| 30-Jul-2024 |
Jose Luis Duran <jlduran@gmail.com> |
nuageinit: Fix passwords
The hashed password usually contains a "$" sign, which, when used on a shell, must be escaped. Also, the plain text password may contain special characters that require esc
nuageinit: Fix passwords
The hashed password usually contains a "$" sign, which, when used on a shell, must be escaped. Also, the plain text password may contain special characters that require escaping.
Add a quick fix by enclosing it in single quotes. Note that if the plain text password contains a "'", it will still fail. This will be properly fixed in later commits.
Some here documents require the document to be a string literal, especially when passing invalid characters. Enclose it in single quotes.
Signed-off-by: Jose Luis Duran <jlduran@gmail.com>
show more ...
|
#
945632ca |
| 30-Jul-2024 |
Jose Luis Duran <jlduran@gmail.com> |
nuageinit: Standardize warning/error messages
Standardize the utilities from nuage.lua, to return nil on failure, plus an error message as a second result, and some value different from nil on succe
nuageinit: Standardize warning/error messages
Standardize the utilities from nuage.lua, to return nil on failure, plus an error message as a second result, and some value different from nil on success.
Make warnmsg() and errmsg() append "nuageinit: " by default. Pass an optional second parameter as false to avoid printing this tag.
Signed-off-by: Jose Luis Duran <jlduran@gmail.com>
show more ...
|
#
9b2d92ad |
| 30-Jul-2024 |
Jose Luis Duran <jlduran@gmail.com> |
nuageinit: Replace os.execute with Lua libraries
Prefer posix.sys.stat's chmod() to os.execute(). While here, change the name of the locals to be more descriptive.
Signed-off-by: Jose Luis Duran <
nuageinit: Replace os.execute with Lua libraries
Prefer posix.sys.stat's chmod() to os.execute(). While here, change the name of the locals to be more descriptive.
Signed-off-by: Jose Luis Duran <jlduran@gmail.com>
show more ...
|
#
50498135 |
| 29-Jul-2024 |
Jose Luis Duran <jlduran@gmail.com> |
nuageinit: Lua check and lint files
Mostly white space, style, and luacheck compliance.
Signed-off-by: Jose Luis Duran <jlduran@gmail.com>
|
#
a6ecbf2b |
| 20-Aug-2024 |
Baptiste Daroussin <bapt@FreeBSD.org> |
nuageinit: improve debugging when mkdir fails
|
#
7aecd689 |
| 23-Jul-2024 |
Jose Luis Duran <jlduran@gmail.com> |
nuageinit: Fix the homedir variable name
cloud-init uses homedir, not home.
|
#
07d17ca1 |
| 23-Jul-2024 |
Jose Luis Duran <jlduran@gmail.com> |
nuageinit: Set recommended SSH permissions
As stated in sshd(8), the recommended permissions for ~/.ssh are read/write/execute for the user, and not accessible by others; and the recommended permiss
nuageinit: Set recommended SSH permissions
As stated in sshd(8), the recommended permissions for ~/.ssh are read/write/execute for the user, and not accessible by others; and the recommended permissions for ~/.ssh/authorized_keys are read/write for the user, and not accessible by others.
show more ...
|
#
7b73ecfe |
| 23-Jul-2024 |
Jose Luis Duran <jlduran@gmail.com> |
nuageinit: Accept plain text passwords
Per pw(8), when -H is set, the password should be supplied already encrypted in a form suitable for writing directly to the password database (passwd in cloud-
nuageinit: Accept plain text passwords
Per pw(8), when -H is set, the password should be supplied already encrypted in a form suitable for writing directly to the password database (passwd in cloud-init tems); -h provides a special interface by which interactive scripts can set an account password using pw(8) in plain text (plain_text_passwd in cloud-init terms).
The default user (freebsd) is defined with a plain_text_passwd (freebsd), not with an encrypted one.
show more ...
|
#
fa07b02f |
| 05-Jun-2024 |
Baptiste Daroussin <bapt@FreeBSD.org> |
nuageinit: make addsshkey friendly for testsuite
|
#
83fcab79 |
| 05-Jun-2024 |
Baptiste Daroussin <bapt@FreeBSD.org> |
nuageinit: use pw(8) instead of getent(1)
pw(8) allows to seek for users in a custom rootdir, which makes it easier for a testsuite
MFC After: 3 days
|
Revision tags: release/14.1.0, release/13.3.0, release/14.0.0, release/13.2.0, release/12.4.0 |
|
#
a42d6f76 |
| 23-Nov-2022 |
Baptiste Daroussin <bapt@FreeBSD.org> |
nuageinit: add basic support for cloudinit.
this is a very early script to support cloudinit, it does not intend to be a full featured cloudinit client, but will support a good enough subset to be v
nuageinit: add basic support for cloudinit.
this is a very early script to support cloudinit, it does not intend to be a full featured cloudinit client, but will support a good enough subset to be viable in most case.
It support nocloud and openstack config-2 config drive mode (iso9660 or msdosfs)
The following features are currently supported: - adding users (including a default user named 'freebsd' with password 'freebsd' - adding groups - adding ssh keys - static ipv4, static ipv6, dynamic ipv4
With this one is able to use the 'bring your own image feature" out of box.
It is expected that the script grows the support of other clouds supporting cloud-init, contributions are welcomed.
It is designed to be only run once via the firstboot mecanism.
Sponsored by: OVHCloud MFC After: 3 weeks Differential Revision: https://reviews.freebsd.org/D44141
show more ...
|