Commit Graph

52 Commits

Author SHA1 Message Date
tschettervictor
2ef9f95477 clone: Allow to clone with VLANs 2025-03-03 14:58:51 -07:00
tschettervictor
de79af7bb4 clone: Fix for same jail description 2025-02-05 13:51:50 -08:00
tschettervictor
6301d637fb clone: Fix missing command 2025-02-05 10:57:44 -08:00
tschettervictor
7250522b1e clone: Rebase 2025-02-05 08:12:20 -08:00
tschettervictor
bf750f2b18 Merge branch 'BastilleBSD:master' into multiple-interfaces 2025-01-11 16:02:11 -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
tschettervictor
c46b033da1 Update clone.sh 2024-12-30 16:56:24 -07:00
tschettervictor
85c12f368b keep better track of interfaces 2024-12-30 12:18:11 -07:00
tschettervictor
a73da1d442 small bugfix 2024-12-29 18:16:43 -07:00
tschettervictor
9f75d11744 clone support multiple interface cloning 2024-12-29 17:47:12 -07:00
tschettervictor
cfadb2537e bugfix for cloneing new mac 2024-12-29 11:43:35 -07:00
tschettervictor
a6e4902d26 Merge changes from previous PR 2024-12-26 08:40:27 -07:00
tschettervictor
0dd2fae1c1 bugfix for hashed name ending with b 2024-12-25 21:35:14 -07:00
tschettervictor
76983fa48c spacing 2024-12-20 08:53:56 -07:00
tschettervictor
6b4a897f62 Spacing 2024-12-20 08:51:46 -07:00
tschettervictor
54e886f682 missing sed command to add new description 2024-12-20 07:23:06 -07:00
tschettervictor
3f0a43046e Update clone.sh 2024-12-19 18:45:55 -07:00
tschettervictor
b12719372c typo 2024-12-16 09:50:01 -07:00
tschettervictor
176e36d00e Merge branch 'BastilleBSD:master' into master 2024-12-16 07:24:28 -07:00
Juan David Hurtado G
8808e8a5a4 [WIP] shellcheck linting 2024-12-08 20:57:43 -05:00
tschettervictor
a42d1223c7 Merge branch 'BastilleBSD:master' into master 2024-12-08 13:21:58 -07:00
tschettervictor
6a3d675e5f Update clone.sh - final commit for static mac cleanup 2024-12-06 12:18:17 -07:00
tschettervictor
9a157f2fc8 Update clone.sh - remove duplicate line 2024-12-04 08:18:53 -07:00
tschettervictor
0a1e9df948 Update clone.sh - revert jail config edit
This reverts some changes the the "update_jailconf" function.

The reason behind this revert is that if a jail somehow has the same name as a directory, then the previous commit would have changed the directory name as well, which would break stuff.

The current code avoids all that and only replaces the necessary jail name value.
2024-12-04 08:18:03 -07:00
Juan David Hurtado G
7dbe1e761b rel: update copyright year and release version 2024-11-24 09:46:09 -05:00
tschettervictor
ca66263ee2 support cloning of bridged VNET jails + static MAC jails
- fixed cloning of VNET bridged jails
- added support for regenerating static MAC on cloned jails
- simplified some sed commands to edit cloned jail.conf file

Tested with bridged VNET, VNET, and loopback jails
2024-10-09 11:30:09 -06:00
tschettervictor
5fab649266 Add see command to rename bridges interface 2024-10-09 09:15:52 -06:00
tschettervictor
ee21616e81 Uncomment for non-VNET jails 2024-10-09 09:05:49 -06:00
tschettervictor
a9c1bae0ca beginning work to allow cloned jail with new static MAC feature
Current implementation allows for cloning jails that were created using a static MAC.

Also removed some unnecessary sed strings. These were simplified.
2024-10-09 08:47:46 -06:00
Christer Edwards
622c926917 support lowercase values in bastille.conf (issue #368) 2023-11-25 15:09:11 -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
Christer Edwards
4efcc5021c update copyright dates 2023-07-14 21:02:14 -06: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
JRGTH
74b6eb76e7 Update the exec.* with uniq_epair when cloning jails
This update will fix the startup error after cloning a jail, this was because the exec.prestart/poststop not being properly updated.
2022-07-14 21:41:52 -04:00
Christer Edwards
aafc2b3323 0.9.20220216 release 2022-02-16 23:28:09 -07:00
Theo BERTIN
6ca0369072 CLONE.SH::ADDED:: Complete FSTAB_RELEASE grep from fstab to get all release names
some release names (such as 14.0-CURRENT) were not correctly extracted from the fstab during fstab modification
2022-02-11 10:16:59 +01:00
Theo BERTIN
66d830a55f CLONE.SH::ADDED:: update fstab paths with new jail path 2022-02-11 09:41:02 +01:00
Christer Edwards
faf3b2b691 use full path when calling jls binary 2021-12-17 19:09:49 -07:00
Théo Bertin
35938461d4 CLONE.SH::FIXED:: ensure release grep in update_fstab only returns the release name once
Situations could happen when release name could match several times (if jail name contains release name for example)
2021-09-11 12:50:55 +02:00
Théo Bertin
b0c5a61d4a CLONE.SH::FIXED:: remove duplicate match group in release grep during fstab updating 2021-09-11 12:42:17 +02:00
Christer Edwards
6fa744bbda update 2021 copyright 2021-01-15 20:00:26 -07:00
Chris Wells
8b4d18f8f3 Create info() and warn() for cleaner print statements. 2020-11-25 21:19:08 -05:00
Jose
855dcf3eae Fix to use SYNCDHCP by default while cloning jails 2020-10-17 17:34:25 -04:00
Chris Wells
c6aded8d0a Ensure target is specified and exists in 1 place instead of many.
Require target to be running for commands that need it.
Closes #239.
2020-08-30 20:15:22 -04:00
Chris Wells
aaffc882f9 Create and leverage global error functions 2020-08-30 10:57:14 -04:00
Jose
3c19c5b183 Initial alternate architecture fetch/create support 2020-07-24 10:47:28 -04:00
Jose
00443ccdd1 Destroy related datasets on target, simplify snapshot naming 2020-04-09 06:32:00 -04:00
Jose
d4dc133e19 Revert to recursive, mandatory here 2020-04-08 23:33:43 -04:00
Jose
4788e78436 Code cleanup, don't delete snapshot recursively 2020-04-08 23:21:13 -04:00