diff options
author | erdgeist <erdgeist@erdgeist.org> | 2006-04-15 20:48:26 +0000 |
---|---|---|
committer | erdgeist <erdgeist@erdgeist.org> | 2006-04-15 20:48:26 +0000 |
commit | 506341bf1774ec09a621d65a2153a3026078061f (patch) | |
tree | dc3487a23310b4597133a52712198869edf3a8d6 | |
parent | ec8cc657b2285d8e9d61da485c47c16d80ae51dd (diff) |
Two bugs preventing jails to be set norun or run have been fixed.
-rwxr-xr-x | ezjail-admin | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/ezjail-admin b/ezjail-admin index 60cc29e..0a889fd 100755 --- a/ezjail-admin +++ b/ezjail-admin | |||
@@ -417,22 +417,22 @@ setup|update) | |||
417 | ;; | 417 | ;; |
418 | ######################## ezjail-admin CONFIG ######################## | 418 | ######################## ezjail-admin CONFIG ######################## |
419 | config) | 419 | config) |
420 | shift | 420 | shift |
421 | 421 | ||
422 | args=`getopt -r: $*` || exerr "Usage: `basename -- $0` config [-r run|norun] jailname" | 422 | args=`getopt -r: $*` || exerr "Usage: `basename -- $0` config [-r run|norun] jailname" |
423 | 423 | ||
424 | ezjail_setrunnable= | 424 | ezjail_setrunnable= |
425 | 425 | ||
426 | set -- ${args} | 426 | set -- ${args} |
427 | for arg do | 427 | for arg do |
428 | case ${arg} in | 428 | case ${arg} in |
429 | -r) ezjail_setrunnable=$1; shift 2;; | 429 | -r) ezjail_setrunnable=$2; shift 2;; |
430 | --) shift; break;; | 430 | --) shift; break;; |
431 | esac | 431 | esac |
432 | done | 432 | done |
433 | 433 | ||
434 | [ $# = 1 ] || exerr "Usage: `basename -- $0` config [-r run|norun] jailname" | 434 | [ $# = 1 ] || exerr "Usage: `basename -- $0` config [-r run|norun] jailname" |
435 | 435 | ||
436 | # Jail name mandatory | 436 | # Jail name mandatory |
437 | fetchjailinfo $1 | 437 | fetchjailinfo $1 |
438 | 438 | ||
@@ -444,10 +444,10 @@ config) | |||
444 | 444 | ||
445 | case ${ezjail_setrunnable} in | 445 | case ${ezjail_setrunnable} in |
446 | run) | 446 | run) |
447 | [ "${ezjail_config}" = "${ezjail_config%.norun}" ] || mv {ezjail_config} ${ezjail_config%.norun} | 447 | [ "${ezjail_config}" = "${ezjail_config%.norun}" ] || mv ${ezjail_config} ${ezjail_config%.norun} |
448 | ;; | 448 | ;; |
449 | norun) | 449 | norun) |
450 | [ "${ezjail_config}" = "${ezjail_config%.norun}" ] && mv {ezjail_config} ${ezjail_config}.norun | 450 | [ "${ezjail_config}" = "${ezjail_config%.norun}" ] && mv ${ezjail_config} ${ezjail_config}.norun |
451 | ;; | 451 | ;; |
452 | esac | 452 | esac |
453 | 453 | ||