diff options
author | erdgeist <erdgeist@erdgeist.org> | 2012-01-07 05:16:48 +0000 |
---|---|---|
committer | erdgeist <erdgeist@erdgeist.org> | 2012-01-07 05:16:48 +0000 |
commit | ddc88c9975019d7a9559866704e9831e68725e5f (patch) | |
tree | 3545e2fc15e83320cda4b9639930dd95d69df675 | |
parent | 1e39cfd7ba2bccc675a87fe646b9dea2b41cb2f0 (diff) |
Make flavourize script a new style rc command
-rwxr-xr-x | ezjail-admin | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/ezjail-admin b/ezjail-admin index 0fddbb9..2f03cf3 100755 --- a/ezjail-admin +++ b/ezjail-admin | |||
@@ -680,17 +680,18 @@ create) | |||
680 | # BEFORE: DAEMON | 680 | # BEFORE: DAEMON |
681 | # PROVIDE: ezjail-config | 681 | # PROVIDE: ezjail-config |
682 | # | 682 | # |
683 | case "$1" in | 683 | name=ezjail-config |
684 | *start) | 684 | start_cmd=flavour_setup |
685 | rm -f "/etc/rc.d/ezjail-config" | 685 | |
686 | for ezjail_flavour in /ezjail.flavour.*; do | 686 | flavour_setup() { |
687 | [ -x "${ezjail_flavour}" ] && "${ezjail_flavour}" | 687 | # N.B.: Do NOT rm $0, it points to /etc/rc |
688 | rm -f "${ezjail_flavour}" | 688 | rm -f "/etc/rc.d/ezjail-config" |
689 | done | 689 | for ezjail_flavour in /ezjail.flavour.*; do |
690 | ;; | 690 | [ -x "${ezjail_flavour}" ] && "${ezjail_flavour}" |
691 | *) | 691 | rm -f "${ezjail_flavour}" |
692 | ;; | 692 | done |
693 | esac | 693 | } |
694 | run_rc_command "$1" | ||
694 | EOF | 695 | EOF |
695 | chmod 0755 "${ezjail_rootdir}/etc/rc.d/ezjail-config" | 696 | chmod 0755 "${ezjail_rootdir}/etc/rc.d/ezjail-config" |
696 | fi | 697 | fi |