You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by vi...@apache.org on 2012/12/05 22:49:50 UTC
svn commit: r1417660 - in /accumulo/branches/1.4/src/assemble: platform/
scripts/ scripts/gc-only-init.sh scripts/master-only-init.sh
scripts/monitor-only-init.sh scripts/stand-alone-init.sh
scripts/tracer-only-init.sh
Author: vines
Date: Wed Dec 5 21:49:49 2012
New Revision: 1417660
URL: http://svn.apache.org/viewvc?rev=1417660&view=rev
Log:
ACCUMULO-792 - scripts now friendly for debian and redhat compatible
Added:
accumulo/branches/1.4/src/assemble/scripts/
accumulo/branches/1.4/src/assemble/scripts/gc-only-init.sh (with props)
accumulo/branches/1.4/src/assemble/scripts/master-only-init.sh (with props)
accumulo/branches/1.4/src/assemble/scripts/monitor-only-init.sh (with props)
accumulo/branches/1.4/src/assemble/scripts/stand-alone-init.sh (with props)
accumulo/branches/1.4/src/assemble/scripts/tracer-only-init.sh (with props)
Removed:
accumulo/branches/1.4/src/assemble/platform/
Added: accumulo/branches/1.4/src/assemble/scripts/gc-only-init.sh
URL: http://svn.apache.org/viewvc/accumulo/branches/1.4/src/assemble/scripts/gc-only-init.sh?rev=1417660&view=auto
==============================================================================
--- accumulo/branches/1.4/src/assemble/scripts/gc-only-init.sh (added)
+++ accumulo/branches/1.4/src/assemble/scripts/gc-only-init.sh Wed Dec 5 21:49:49 2012
@@ -0,0 +1,47 @@
+#! /bin/sh
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+if [ $(id -ur) -ne 0 ]; then
+ echo "This script must be run as root" 1>&2
+ exit 1
+fi
+
+if [ ! -f /etc/default/accumulo ]; then
+ mkdir -p /etc/default
+ touch /etc/default/accumulo
+fi
+
+if ! grep "ACCUMULO_USER=" /etc/default/accumulo >> /dev/null ; then
+ echo "ACCUMULO_USER=accumulo" >> /etc/default/accumulo
+fi
+
+if ! id -u accumulo >/dev/null 2>&1; then
+ groupArg="U"
+ if egrep "^accumulo:" /etc/group >> /dev/null; then
+ groupArg="g accumulo"
+ fi
+ useradd -$groupArg -d /usr/lib/accumulo accumulo
+fi
+
+install -m 0755 -o root -g root init.d/accumulo-gc /etc/init.d/
+
+if [ -e "`which update-rc.d`" ]; then
+ update-rc.d accumulo-gc start 21 2 3 4 5 . stop 20 0 1 6 .
+elif [ -e "`which chkconfig`" ]; then
+ chkconfig --add accumulo-gc
+else
+ echo "No update-rc.d or chkconfig, rc levels not set for accumulo-gc"
+fi
Propchange: accumulo/branches/1.4/src/assemble/scripts/gc-only-init.sh
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: accumulo/branches/1.4/src/assemble/scripts/gc-only-init.sh
------------------------------------------------------------------------------
svn:executable = *
Added: accumulo/branches/1.4/src/assemble/scripts/master-only-init.sh
URL: http://svn.apache.org/viewvc/accumulo/branches/1.4/src/assemble/scripts/master-only-init.sh?rev=1417660&view=auto
==============================================================================
--- accumulo/branches/1.4/src/assemble/scripts/master-only-init.sh (added)
+++ accumulo/branches/1.4/src/assemble/scripts/master-only-init.sh Wed Dec 5 21:49:49 2012
@@ -0,0 +1,46 @@
+#! /bin/sh
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+if [ $(id -ur) -ne 0 ]; then
+ echo "This script must be run as root" 1>&2
+ exit 1
+fi
+
+if [ ! -f /etc/default/accumulo ]; then
+ mkdir -p /etc/default
+ touch /etc/default/accumulo
+fi
+
+if ! grep "ACCUMULO_USER=" /etc/default/accumulo >> /dev/null ; then
+ echo "ACCUMULO_USER=accumulo" >> /etc/default/accumulo
+fi
+
+if ! id -u accumulo >/dev/null 2>&1; then
+ groupArg="U"
+ if egrep "^accumulo:" /etc/group >> /dev/null; then
+ groupArg="g accumulo"
+ fi
+ useradd -$groupArg -d /usr/lib/accumulo accumulo
+fi
+
+install -m 0755 -o root -g root init.d/accumulo-master /etc/init.d/
+if [ -e "`which update-rc.d`" ]; then
+ update-rc.d accumulo-master start 21 2 3 4 5 . stop 19 0 1 6 .
+elif [ -e "`which chkconfig`" ]; then
+ chkconfig --add accumulo-master
+else
+ echo "No update-rc.d or chkconfig, rc levels not set for accumulo-master"
+fi
Propchange: accumulo/branches/1.4/src/assemble/scripts/master-only-init.sh
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: accumulo/branches/1.4/src/assemble/scripts/master-only-init.sh
------------------------------------------------------------------------------
svn:executable = *
Added: accumulo/branches/1.4/src/assemble/scripts/monitor-only-init.sh
URL: http://svn.apache.org/viewvc/accumulo/branches/1.4/src/assemble/scripts/monitor-only-init.sh?rev=1417660&view=auto
==============================================================================
--- accumulo/branches/1.4/src/assemble/scripts/monitor-only-init.sh (added)
+++ accumulo/branches/1.4/src/assemble/scripts/monitor-only-init.sh Wed Dec 5 21:49:49 2012
@@ -0,0 +1,45 @@
+#! /bin/sh
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+if [ $(id -ur) -ne 0 ]; then
+ echo "This script must be run as root" 1>&2
+ exit 1
+fi
+
+if [ ! -f /etc/default/accumulo ]; then
+ mkdir -p /etc/default
+ touch /etc/default/accumulo
+fi
+
+if ! grep "ACCUMULO_MONITOR_USER=" /etc/default/accumulo >> /dev/null ; then
+ echo "ACCUMULO_MONITOR_USER=accumulo_monitor" >> /etc/default/accumulo
+fi
+
+if ! id -u accumulo_monitor >/dev/null 2>&1; then
+ if ! egrep "^accumulo:" /etc/group > /dev/null; then
+ groupadd accumulo
+ fi
+ useradd -d /usr/lib/accumulo -g accumulo accumulo_monitor
+fi
+
+install -m 0755 -o root -g root init.d/accumulo-monitor /etc/init.d/
+if [ -e "`which update-rc.d`" ]; then
+ update-rc.d accumulo-monitor start 21 2 3 4 5 . stop 20 0 1 6 .
+elif [ -e "`which chkconfig`" ]; then
+ chkconfig --add accumulo-monitor
+else
+ echo "No update-rc.d or chkconfig, rc levels not set for accumulo-monitor"
+fi
Propchange: accumulo/branches/1.4/src/assemble/scripts/monitor-only-init.sh
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: accumulo/branches/1.4/src/assemble/scripts/monitor-only-init.sh
------------------------------------------------------------------------------
svn:executable = *
Added: accumulo/branches/1.4/src/assemble/scripts/stand-alone-init.sh
URL: http://svn.apache.org/viewvc/accumulo/branches/1.4/src/assemble/scripts/stand-alone-init.sh?rev=1417660&view=auto
==============================================================================
--- accumulo/branches/1.4/src/assemble/scripts/stand-alone-init.sh (added)
+++ accumulo/branches/1.4/src/assemble/scripts/stand-alone-init.sh Wed Dec 5 21:49:49 2012
@@ -0,0 +1,26 @@
+#! /bin/sh
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+if [ $(id -ur) -ne 0 ]; then
+ echo "This script must be run as root" 1>&2
+ exit 1
+fi
+
+./gc-only-init.sh
+./monitor-only-init.sh
+./tracer-only-init.sh
+./master-only-init.sh
+./slave-only-init.sh
Propchange: accumulo/branches/1.4/src/assemble/scripts/stand-alone-init.sh
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: accumulo/branches/1.4/src/assemble/scripts/stand-alone-init.sh
------------------------------------------------------------------------------
svn:executable = *
Added: accumulo/branches/1.4/src/assemble/scripts/tracer-only-init.sh
URL: http://svn.apache.org/viewvc/accumulo/branches/1.4/src/assemble/scripts/tracer-only-init.sh?rev=1417660&view=auto
==============================================================================
--- accumulo/branches/1.4/src/assemble/scripts/tracer-only-init.sh (added)
+++ accumulo/branches/1.4/src/assemble/scripts/tracer-only-init.sh Wed Dec 5 21:49:49 2012
@@ -0,0 +1,45 @@
+#! /bin/sh
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+if [ $(id -ur) -ne 0 ]; then
+ echo "This script must be run as root" 1>&2
+ exit 1
+fi
+
+if [ ! -f /etc/default/accumulo ]; then
+ mkdir -p /etc/default
+ touch /etc/default/accumulo
+fi
+
+if ! grep "ACCUMULO_TRACER_USER=" /etc/default/accumulo >> /dev/null ; then
+ echo "ACCUMULO_TRACER_USER=accumulo_tracer" >> /etc/default/accumulo
+fi
+
+if ! id -u accumulo_tracer >/dev/null 2>&1; then
+ if ! egrep "^accumulo:" /etc/group >> /dev/null; then
+ groupadd accumulo
+ fi
+ useradd -d /usr/lib/accumulo -g accumulo accumulo_tracer
+fi
+
+install -m 0755 -o root -g root init.d/accumulo-tracer /etc/init.d/
+if [ -e "`which update-rc.d`" ]; then
+ update-rc.d accumulo-tracer start 21 2 3 4 5 . stop 20 0 1 6 .
+elif [ -e "`which chkconfig`" ]; then
+ chkconfig --add accumulo-tracer
+else
+ echo "No update-rc.d or chkconfig, rc levels not set for accumulo-tracer"
+fi
Propchange: accumulo/branches/1.4/src/assemble/scripts/tracer-only-init.sh
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: accumulo/branches/1.4/src/assemble/scripts/tracer-only-init.sh
------------------------------------------------------------------------------
svn:executable = *