Commit Graph

144 Commits

Author SHA1 Message Date
tschettervictor
94da0c4817 create: digits/numerals > digits 2025-01-24 08:06:39 -07:00
tschettervictor
8425524959 create: Clarify numbers > digits/numerals 2025-01-24 07:52:22 -07:00
tschettervictor
d4d747de05 create: Do not allow only numbers in name 2025-01-20 19:25:02 -07:00
tschettervictor
10822931bb create: Static MAC optional 2025-01-13 13:19:26 -07:00
Juan David Hurtado G
8b0411c111 Add SPDX license identifiers and update copyright years
Added SPDX-License-Identifier to all scripts for better license clarity and compliance. Updated the copyright years from 2024 to 2025 in various files to reflect the current maintenance period.
2025-01-11 14:07:41 -05:00
Juan David Hurtado G
78d2ae9b2c shellcheck: fix create intentional '@' and disable SC2140 2024-12-15 11:02:28 -05:00
Juan David Hurtado G
b6bf75a4ef [WIP] shellcheck linting 2024-12-08 21:05:45 -05:00
Juan David Hurtado G
7dbe1e761b rel: update copyright year and release version 2024-11-24 09:46:09 -05:00
Stefano Marinelli
6ca8ea578e Adjust devfs_ruleset for hierarchical jails compatibility
Hierarchical jails inherit the parent jail's permissions and don't support setting devfs_ruleset to a non-zero value. This update adds a check to determine if the script is running inside a jail. If so, it sets devfs_ruleset to 0 to comply with this constraint.
2023-11-27 18:45:09 +01:00
Christer Edwards
622c926917 support lowercase values in bastille.conf (issue #368) 2023-11-25 15:09:11 -07:00
Christer Edwards
97a0e692d9 standardize options in create matrix 2023-11-24 16:41:25 -07:00
Christer Edwards
3df39078bf support combining options for bastille create 2023-11-24 16:28:31 -07:00
Christer Edwards
ace7bdce2f add osrelease to jail.conf for new jails 2023-11-19 14:37:31 -07:00
Romain Tartière
157125c4af Relax validation of -BETA / -RC releases
Accross the code, release names are checked against some variation of
-BETAx / -RCx which are inconsistent in the range of accepted values for
`x`.

As  a consequence, some commands cannot be successfuly run while they
are valid, e.g. `bastille create test 14.0-RC4 10.0.0.2` is rejected
because only `*-RC1` and `*-RC2` are accepted as a RC release name.

Find out these lists of specific BETA and RC patterns and adjust them to
allow any one-digit value at the end.  We generaly do up to 4 BETA / RC
releases, so a one digit limit is probably enough for the time being.
2023-11-10 08:09:51 -10:00
Michal Procházka
cf928f1237 Fix generated interface name in rc.conf for vnet jail 2023-10-30 20:39:58 +01:00
Christer Edwards
15f2ea8574 Merge branch 'master' of https://github.com/bastillebsd/bastille into 2023_release 2023-07-14 21:02:30 -06:00
Christer Edwards
4efcc5021c update copyright dates 2023-07-14 21:02:14 -06:00
gqgunhed
8d16399e50 Added NAME_VERIFY=Ubuntu_2204 section 2023-07-10 12:13:22 +02:00
gqgunhed
bea80db898 Exchanged entry for Debian9 with Debian12 2023-07-10 12:08:47 +02:00
gqgunhed
a89f42242c Added ubuntu-jammy and bookworm releases
removed "stretch" release
2023-07-10 12:04:40 +02:00
JRGTH
2e583cf9ab Add missing spaces for consistency
Add missing spaces for jail.conf  content consistency.
2023-05-02 09:55:35 -04:00
Lars Engels
64c3b6045e Allow running bastille and subcomands with help flags as regular user 2023-03-16 20:58:11 +01:00
William Erik Baxter
ec18847f3e Fix bug in ip-in-use test
Need grep -wF instead of grep -w for IP test to avoid spurious match
against broadcast address in ifconfig output.
2022-12-04 05:47:15 -06:00
Christer Edwards
778ef6e581 fixing regression in create.sh for Linux containers 2022-11-02 21:17:05 -06:00
Evilham
f6f179b6c3 Updates for latest commits 2022-10-13 10:49:26 +02:00
Evilham
fdfbb8287f Improve dualstack and IPv6 support on jail creation
This is still WIP / PoC and would require documentation changes, opening PR to
gather feedback as this is a first-time contribution.

Important changes:
- instead of relying on 0.0.0.0 to signal DHCP, we now support passing "DHCP" in
the IP parameter.
- we also support "SLAAC" as a value for the IP parameter, which enables
accepting route advertisement
- fixed an oddity in the way the gateway was being handled for IPv6 (in certain
cases it was being passed as the GATEWAY template parameter
- allow passing multiple values to the IP parameter, this would work as a quoted
parameter
- that means that, e.g. bastille create -V test 13.0-RELEASE "SLAAC DHCP" wan is
possible and creates a dual-stack jail
- passing both DHCP, SLAAC and fixed IPs is also possible, but only one IP per
protocol number is supported; last one wins
2022-10-13 10:49:26 +02:00
Chuck Tuffli
abc8a6b280 Allow Linux jails to see their mount points
Some Linux packages (shakes fist angrily at Java) look to see if `/proc` is mounted as a part of the installation by running
   `mountpoint /proc`
While the Linux jail can see the contents of its `/proc` directory, the linprocfs driver will not generate the correct contents for `/proc/mounts` or `/proc/self/mountinfo` as `kern_getfsstat()` will, by default, filter all mount points other than the jail's chroot directory.

Fix is to set `enforce_statfs` to allow mount points below the jail's chroot directory to be visible.
2022-03-04 08:16:33 -08:00
JRGTH
03b9817f5a Initial support for clone jails 2022-01-15 11:32:28 -04:00
Rob Arnold
c98d03a8e5 Import basic vnet settings from iocage
There's quite a bit more we could do here, but this hits my basic usage
with vnets. Future work here would be things like ipv6 support or trying
to infer what a custom `interfaces` setting means.
2022-01-13 21:04:15 -08:00
yaazkal
17e4fa78f9 [FIX] vnet: use the right search pattern to choose the unique epair 2021-12-28 22:42:52 -05:00
yaazkal
c8545e8598 [REF] indentation: change tab to spaces 2021-12-28 21:22:30 -05:00
yaazkal
9a47a6c573 [REF] SC2003: expr is antiquated 2021-12-28 21:19:54 -05:00
Christer Edwards
2f59bdecec add Debian 11 'bullseye' to Linux supported list 2021-12-22 18:35:49 -07:00
Christer Edwards
a115ba5b87 Merge pull request #420 from JRGTH/master
Extra validation for Linux jails, small changes
2021-12-21 20:15:58 -07:00
Christer Edwards
5dabc75257 hotfix for the VNET interface description patch 2021-12-21 19:20:31 -07:00
Christer Edwards
faf3b2b691 use full path when calling jls binary 2021-12-17 19:09:49 -07:00
yaazkal
68951de687 [FIX] Only use host's time zone for jails when already set in host 2021-12-12 12:38:05 -05:00
yaazkal
35d3038bea [REF] Use host's time zone for jails by default 2021-12-12 12:10:39 -05:00
Christer Edwards
c09a5b05bf Merge pull request #459 from robarnold/description
Add a description to the host vnet interface
2021-12-09 10:53:28 -07:00
Stefano Marinelli
d951a70b30 Added doc and fixes - bridge support 2021-12-02 15:22:08 +01:00
Stefano Marinelli
ec1356df08 Added and modified code for existing bridge jail attachement. 2021-12-02 15:06:47 +01:00
Rob Arnold
0a232dd140 Add a description to the host vnet interface
This makes it much easier to understand `ifconfig` when run on the jail host. Not sure how to test this, but manually appyling this via `bastille edit` to an existing vnet jail had the right effects when I restarted the jail.
2021-11-14 19:53:55 -08:00
JRGTH
9d3cb5f5e3 Merge remote-tracking branch 'upstream/master' 2021-08-06 17:22:22 -04:00
Yaazkal
a21be862d8 Adds: Debian 10 (Buster) as a release for linux jails 2021-07-30 07:40:01 -05:00
Florian Gattermeier
2581218f82 Added logic for setting ipv6_defaultrouter for vnet template 2021-07-26 11:13:04 +02:00
Yaazkal
f6b2e57051 Adds: Debian 9 (Stretch) as a release for linux jails 2021-07-23 12:07:21 -05:00
JRGTH
c90fea3066 Extra validation on Linux Jails, revert cp.sh to avoid issues with templates 2021-07-15 16:30:36 -04:00
cynix
387fe3cf91 Avoid mounting devfs twice 2021-07-15 23:01:13 +10:00
cynix
857414f410 Fix missing redirection 2021-07-15 21:26:35 +10:00
cynix
b294a45bb9 Fix fstab creation for Linux jails 2021-07-15 20:52:16 +10:00