Repository: bigtop Updated Branches: refs/heads/master 19609d135 -> 946787854
BIGTOP-3038: Add rollingupgrade option in hadoop-hdfs-namenode.svc Signed-off-by: Evans Ye <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/94678785 Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/94678785 Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/94678785 Branch: refs/heads/master Commit: 9467878546b5082b5e91a3bc241ed6d5d280d396 Parents: 19609d1 Author: Sahil Aggarwal <[email protected]> Authored: Tue Jun 5 19:26:21 2018 +0530 Committer: Evans Ye <[email protected]> Committed: Wed Jun 6 00:41:50 2018 +0800 ---------------------------------------------------------------------- bigtop-packages/src/common/hadoop/hadoop-hdfs-namenode.svc | 6 +++++- bigtop-packages/src/templates/init.d.tmpl | 3 +-- 2 files changed, 6 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/bigtop/blob/94678785/bigtop-packages/src/common/hadoop/hadoop-hdfs-namenode.svc ---------------------------------------------------------------------- diff --git a/bigtop-packages/src/common/hadoop/hadoop-hdfs-namenode.svc b/bigtop-packages/src/common/hadoop/hadoop-hdfs-namenode.svc index f17014e..9422aac 100644 --- a/bigtop-packages/src/common/hadoop/hadoop-hdfs-namenode.svc +++ b/bigtop-packages/src/common/hadoop/hadoop-hdfs-namenode.svc @@ -29,6 +29,10 @@ cat <<'__EOT__' DAEMON_FLAGS="$DAEMON_FLAGS -${1}" start ;; + rollingupgrade) + DAEMON_FLAGS="$DAEMON_FLAGS -${1} ${2}" + start + ;; init) check_for_root checkstatusofproc @@ -40,7 +44,7 @@ cat <<'__EOT__' fi ;; *) - echo $"Usage: $0 {start|stop|status|restart|try-restart|condrestart|upgrade|rollback|init}" + echo $"Usage: $0 {start|stop|status|restart|try-restart|condrestart|upgrade|rollback|rollingupgrade [downgrade|rollback|started]|init}" exit 1 __EOT__ http://git-wip-us.apache.org/repos/asf/bigtop/blob/94678785/bigtop-packages/src/templates/init.d.tmpl ---------------------------------------------------------------------- diff --git a/bigtop-packages/src/templates/init.d.tmpl b/bigtop-packages/src/templates/init.d.tmpl index 35326b8..42b7758 100755 --- a/bigtop-packages/src/templates/init.d.tmpl +++ b/bigtop-packages/src/templates/init.d.tmpl @@ -246,7 +246,6 @@ checkstatusofproc(){ checkstatus(){ checkstatusofproc status=$? - case "$status" in $STATUS_RUNNING) log_success_msg "${DESC} is running" @@ -309,7 +308,7 @@ cat <<'__EOT__' esac } -service "$1" +service "$@" exit $RETVAL __EOT__
