diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2008-07-07 12:36:45 +0000 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2008-07-07 12:36:45 +0000 |
| commit | cd753c0f87be449728bf15bf347fa6615f6d55f9 (patch) | |
| tree | ddf56718f7da194d6c14921f3efb56502a56a07a /ezjail-admin | |
| parent | 7d9d19af7fb5b140e15315a6bfca38b573818baf (diff) | |
When restoring, use rcorder-lines from old ezjails config
Diffstat (limited to 'ezjail-admin')
| -rwxr-xr-x | ezjail-admin | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/ezjail-admin b/ezjail-admin index 5b314ff..7df911d 100755 --- a/ezjail-admin +++ b/ezjail-admin | |||
| @@ -309,7 +309,7 @@ case "$1" in | |||
| 309 | ######################## ezjail-admin CREATE ######################## | 309 | ######################## ezjail-admin CREATE ######################## |
| 310 | create) | 310 | create) |
| 311 | # Clean variables, prevent polution | 311 | # Clean variables, prevent polution |
| 312 | unset ezjail_rootdir ezjail_flavour ezjail_softlink ezjail_image ezjail_imagetype ezjail_imageparams ezjail_imagesize ezjail_device ezjail_devicelink ezjail_config ezjail_attachparams ezjail_exists ezjail_attachblocking ezjail_forceblocking ezjail_sourcedevice ezjail_rootdirempty ezjail_fromarchive | 312 | unset ezjail_rootdir ezjail_flavour ezjail_softlink ezjail_image ezjail_imagetype ezjail_imageparams ezjail_imagesize ezjail_device ezjail_devicelink ezjail_config ezjail_attachparams ezjail_exists ezjail_attachblocking ezjail_forceblocking ezjail_sourcedevice ezjail_rootdirempty ezjail_fromarchive ezjail_fromarchive_config |
| 313 | shift; while getopts :f:r:s:xbic:C:a:A: arg; do case ${arg} in | 313 | shift; while getopts :f:r:s:xbic:C:a:A: arg; do case ${arg} in |
| 314 | x) ezjail_exists="YES";; | 314 | x) ezjail_exists="YES";; |
| 315 | r) ezjail_rootdir=${OPTARG};; | 315 | r) ezjail_rootdir=${OPTARG};; |
| @@ -496,8 +496,13 @@ create) | |||
| 496 | # now, where everything seems to have gone right, create control file in | 496 | # now, where everything seems to have gone right, create control file in |
| 497 | # ezjails config dir | 497 | # ezjails config dir |
| 498 | mkdir -p "${ezjail_jailcfgs}" || exerr "Error: can't create ezjails control directory (${ezjail_jailcfgs})." | 498 | mkdir -p "${ezjail_jailcfgs}" || exerr "Error: can't create ezjails control directory (${ezjail_jailcfgs})." |
| 499 | ( echo -e "# To specify the start up order of your ezjails, use these lines to\n# create a Jail dependency tree. See rcorder(8) for more details." | 499 | ( |
| 500 | echo -e "#\n# PROVIDE: standard_ezjail\n# REQUIRE: \n# BEFORE: \n#\n" | 500 | if [ "${ezjail_fromarchive_config}" ]; then |
| 501 | grep -E ^\# ${ezjail_fromarchive_config}; echo | ||
| 502 | else | ||
| 503 | echo -e "# To specify the start up order of your ezjails, use these lines to\n# create a Jail dependency tree. See rcorder(8) for more details." | ||
| 504 | echo -e "#\n# PROVIDE: standard_ezjail\n# REQUIRE: \n# BEFORE: \n#\n" | ||
| 505 | fi | ||
| 501 | echo export jail_${ezjail_safename}_hostname=\"${ezjail_hostname}\" | 506 | echo export jail_${ezjail_safename}_hostname=\"${ezjail_hostname}\" |
| 502 | echo export jail_${ezjail_safename}_ip=\"${ezjail_ip}\" | 507 | echo export jail_${ezjail_safename}_ip=\"${ezjail_ip}\" |
| 503 | echo export jail_${ezjail_safename}_rootdir=\"${ezjail_rootdir}\" | 508 | echo export jail_${ezjail_safename}_rootdir=\"${ezjail_rootdir}\" |
