My goal was to create "jail setup up scripts" using shell script (took inspiration from BSDPot) and I wanted to an easy(ier) way to create jails and test my scripts (while still giving myself some sort of organization). I ended up creating a simple script that creates jails the way the handbook says to: jail.conf. My script works but now I'm wondering what I did wrong.
My script doesn't do anything extravagant besides extract the userland, load in my script but it cant be this simple.
I was wondering if someone could please test this (even a simple once-over-eyes-only will suffice). I'm still learning shell script--and I knew I wanted to ask for a quick test so, I took some time and tried to add a bit of "professionalism" to the script by using function defs, validating, checking and what not to make it easier to follow. I also put a bit more effort into the makefile (to install/uninstall from traditional locations) and documentation. I'm not proposing yet another jail manager (which is this is not) but I want to verify if this method works before I go off creating a bunch of "setup scripts". I know my coding is not great but someone with more experience can tell me if this script will launch rockets or something horrible at least.
My script doesn't do anything extravagant besides extract the userland, load in my script but it cant be this simple.
I was wondering if someone could please test this (even a simple once-over-eyes-only will suffice). I'm still learning shell script--and I knew I wanted to ask for a quick test so, I took some time and tried to add a bit of "professionalism" to the script by using function defs, validating, checking and what not to make it easier to follow. I also put a bit more effort into the makefile (to install/uninstall from traditional locations) and documentation. I'm not proposing yet another jail manager (which is this is not) but I want to verify if this method works before I go off creating a bunch of "setup scripts". I know my coding is not great but someone with more experience can tell me if this script will launch rockets or something horrible at least.
GitHub - JohnKaul/jcreate: Script to create a FreeBSD jail.conf style jail with setup script, mounts, copy-in abilities
Script to create a FreeBSD jail.conf style jail with setup script, mounts, copy-in abilities - JohnKaul/jcreate
github.com