diff options
author | Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com> | 2011-03-22 16:42:47 -0700 |
---|---|---|
committer | Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com> | 2011-03-22 16:42:47 -0700 |
commit | 1e6f82756d7b9836942619c0cae9ff2de4d4425c (patch) | |
tree | 47b2af4359244b9ec12ac8b1f59ab8ad49aefd93 | |
parent | 271c5f28dd1ab704ab80cd29b72c11838d565585 (diff) |
cleanup: remove unused 'InfraStack/OSDependent/Linux/scripts'
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
-rw-r--r-- | InfraStack/OSDependent/Linux/scripts/daemon_install.sh | 345 | ||||
-rw-r--r-- | InfraStack/OSDependent/Linux/scripts/wimax.midinux | 60 | ||||
-rw-r--r-- | InfraStack/OSDependent/Linux/scripts/wimax.ume | 101 | ||||
-rw-r--r-- | InfraStack/OSDependent/Linux/scripts/wimax_appsrv.so.conf | 1 |
4 files changed, 0 insertions, 507 deletions
diff --git a/InfraStack/OSDependent/Linux/scripts/daemon_install.sh b/InfraStack/OSDependent/Linux/scripts/daemon_install.sh deleted file mode 100644 index 84a32a5..0000000 --- a/InfraStack/OSDependent/Linux/scripts/daemon_install.sh +++ /dev/null @@ -1,345 +0,0 @@ -#! /bin/sh -############################################################################# -# -# Copyright (c) 2007-2008, Intel Corporation. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# 3. Neither the name of the Intel Corporation nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################# - -# daemon install script -# This file is used by Makefile to install the component - -set -e - -project_name=wimax_appsrv -daemon_name=wimax_appsrvd -bin_name=wimax_appsrvd -cubin_name=wimaxcu -updater_name=wimax_updater -daemon_script_name=wimax_appsrv -so_conf_file=wimax_appsrv.so.conf -target= - -DESTDIR=${DESTDIR:-} -config_dir=$DESTDIR/etc/$project_name -ndns_config_dir=$DESTDIR/usr/share/$project_name -lib_dir=$DESTDIR/usr/lib/$project_name -bin_dir=$DESTDIR/usr/bin -updater_dir=$DESTDIR/usr/share/$project_name/$updater_name -log_dir=$DESTDIR/var/log/$project_name -pidfile_dir=$DESTDIR/var/run -lockfile_dir=$DESTDIR/var/lock/subsys -daemon_dir=$DESTDIR/etc/init.d -so_conf_dir=$DESTDIR/etc/ld.so.conf.d - -create_dir() -{ - target_dir="$1" - echo -n " Creating $target_dir....." - if [ ! -d $target_dir ] - then - mkdir -p $target_dir && chmod 755 $1 $target_dir && echo "created [OK]" - else - echo "exist [OK]" - fi -} - -remove_dir() -{ - target_dir="$1" - echo -n " Removing $target_dir....." - if [ -d $target_dir ] - then - if [ -z "`ls $target_dir`" ] - then - rm -rf $target_dir && echo "removed [OK]" - else - echo "is not empty [OK]" - fi - else - echo "does not exist [OK]" - fi -} - -copy_file() -{ - source_dir="$1" - source_file="$2" - target_dir="$3" - target_file= - if [ ! "$4" ] - then - target_file=$2 - else - target_file=$4 - fi - - echo -n " Copying $source_file to $target_dir....." - if [ ! -f "$source_dir/$source_file" ] - then - echo "source $source_dir/$source_file NOT EXIST [FAIL]" - return 1 - fi - - [ -f $target_dir/$target_file ] && rm -f $target_dir/$target_file - - cp $source_dir/$source_file $target_dir/$target_file - echo "copied [OK]" -} - -delete_file() -{ - target_dir="$1" - target_file="$2" - - echo -n " Deleting $target_dir/$target_file....." - if [ -f $target_dir/$target_file ] - then - rm -f $target_dir/$target_file && echo "deleted [OK]" - else - echo "does not exist [OK]" - fi -} - -link_file() -{ - source_dir="$1" - target_dir="$1" - source_file="$2" - target_file="$3" - - echo -n " Linking $source_file to $target_file....." - if [ ! -f "$source_dir/$source_file" ] - then - echo "source $source_dir/$source_file NOT EXIST [FAIL]" - return 1 - fi - - [ -f $target_dir/$target_file ] && rm -f $target_dir/$target_file - curr_dir=`pwd` - cd $source_dir - ln -s $source_file $target_file - cd $curr_dir - echo "linked [OK]" -} - -delete_link() -{ - target_dir="$1" - target_file="$2" - - echo -n " Deleting $target_dir/$target_file....." - if [ -s $target_dir/$target_file ] - then - rm -f $target_dir/$target_file && echo "deleted [OK]" - else - echo "does not exist [OK]" - fi -} - -install_daemon() -{ - # config dir - echo "### config.xml ###" - if [ -e $config_dir/config.xml ] ; then - echo " $config_dir/config.xml exists, not overwritten" - else - create_dir $config_dir - copy_file $output_dir config.xml $config_dir - fi - - echo "### bootstrap.xml ###" - if [ -e $config_dir/bootstrap.xml ] ; then - echo " $config_dir/bootstrap.xml exists, not overwritten" - else - create_dir $config_dir - copy_file $output_dir bootstrap.xml $config_dir - fi - - - # NDnS config dir - echo "" - echo "### NDnSAgent config for driver ###" - create_dir $ndns_config_dir - copy_file $output_dir NDnSAgentConfig_forDriver.xml $ndns_config_dir - copy_file $output_dir NDnSAgentDefaultConfig.xml $ndns_config_dir - copy_file $output_dir DefaultTracesAndMonitors.xml $ndns_config_dir - - # so lib dir - echo "" - echo "### so files ###" - create_dir $lib_dir - copy_file $output_dir libL5Dispatcher.so $lib_dir - copy_file $output_dir libPipeHandler.so $lib_dir - copy_file $output_dir libiWmxSDK.so $lib_dir - copy_file $output_dir libServices.so $lib_dir - copy_file $output_dir libosal.so $lib_dir - - create_dir $so_conf_dir - copy_file $PWD/scripts $so_conf_file $so_conf_dir - - if ! ldconfig - then - echo "WARNING: ldconfig failed (not enough permssions?)" - fi - - echo "" - echo "### binaries ###" - create_dir $bin_dir - copy_file $output_dir wimax_appsrvd $bin_dir - copy_file $output_dir wimaxcu $bin_dir - - echo "" - echo "### log directory ###" - create_dir $log_dir - - # copy daemon script - echo "" - echo "### daemon script ###" - create_dir $daemon_dir - copy_file $PWD/scripts $daemon_script_name.$target $daemon_dir $daemon_script_name - echo " NOTE: daemon script is not registered. It will not start during the boot time" - - # copy updater file - echo "" - echo "### updater script ###" - create_dir $updater_dir - cp -f $PWD/wimax_updater/* $updater_dir - chmod +x $updater_dir/$updater_name - [ -f $bin_dir/$updater_name ] && rm -f $bin_dir/$updater_name - ln -sf /usr/share/wimax_appsrv/$updater_name/$updater_name $bin_dir/$updater_name -} - -remove_daemon() -{ - # config dir - echo "" - echo "### config.xml ###" - delete_file $config_dir config.xml - remove_dir $config_dir - - # NDnS config dir - echo "" - echo "### NDnSAgent config for driver ###" - delete_file $ndns_config_dir NDnSAgentConfig_forDriver.* - delete_file $ndns_config_dir NDnSAgentDefaultConfig.* - delete_file $ndns_config_dir DefaultTracesAndMonitors.* - remove_dir $ndns_config_dir - - # so lib dir - echo "" - echo "### so files ###" - delete_file $lib_dir libL5Dispatcher.so - delete_file $lib_dir libPipeHandler.so - delete_file $lib_dir libiWmxSDK.so - delete_file $lib_dir libServices.so - delete_file $lib_dir libosal.so - delete_file $so_conf_dir wimax_appsrv.so.conf - remove_dir $lib_dir - if ! ldconfig - then - echo " WARNING: ldconfig failed (not enough permissions?)" - fi - - echo "" - echo "### binaries ###" - delete_file $bin_dir wimax_appsrvd - delete_file $bin_dir wimaxcu - - echo "" - echo "### log directory ###" - remove_dir $log_dir - - echo "" - echo "### daemon script ###" - delete_file $daemon_dir $daemon_script_name - echo " NOTE: daemon script is not registered. It will not start during the boot time" - - -} - -get_output_dir() -{ - case "$1" in - Debug) - config=Debug - ;; - Release) - config=Release - ;; - *) - print_usage - ;; - esac - currdir=`pwd` - output_dir=`pwd`/tools_projects/Pipe/build_output/$config - cd $currdir -} - - -print_usage() -{ - echo "Usage: install [Debug|Release] [ume|midinux]" - echo "Usage: remove" - exit 1 -} - -# main flow of the script -if [ $USER != root ] ; then - echo Must be root to run this script. - exit 1 -fi - -if [ ! -d tools_projects ] ; then - echo Must be run from top lever folder. - exit 1 -fi - -case "$1" in - install) - get_output_dir "$2" - case "$3" in - ume) - target=ume - ;; - midinux) - target=midinux - ;; - *) - print_usage - ;; - esac - install_daemon - ;; - remove) - remove_daemon - ;; - *) - print_usage - ;; -esac diff --git a/InfraStack/OSDependent/Linux/scripts/wimax.midinux b/InfraStack/OSDependent/Linux/scripts/wimax.midinux deleted file mode 100644 index f8c01e2..0000000 --- a/InfraStack/OSDependent/Linux/scripts/wimax.midinux +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/bash -# -# /etc/rc.d/init.d/wimaxd -# -# description: start/stop the wimax daemon -DESC_APPSRV="WiMAX Network Service" -NAME=wimax -BINPATH=VALUE -BINNAME=wimaxd -VARRUNPATH=VARRUNDIR -DAEMONSCRIPTDIR=DAEMONDIR -DAEMON=$BINPATH/$BINNAME -PIDFILE=$VARRUNPATH/$BINNAME.pid -SCRIPTNAME=$DAEMONSCRIPTDIR/$NAME - -# Source function library. -. /etc/init.d/functions - -start() { - - echo -n "Starting WiMAX Network Service: " - if [ -f $PIDFILE ]; then - PID=`cat $PIDFILE` - echo -e "\n$DESC_APPSRV is already running:$PID" - exit 2; - else - daemon $BINPATH/$BINNAME - RETVAL=$? - echo - [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$BINNAME -# sleep 5 - fi -} - -stop() { - echo -n "Shutting down WiMAX Network Service:" - killproc -p $PIDFILE - RETVAL=$? - echo - [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$BINNAME - rm -f $PIDFILE -} - -case "$1" in - start) - start - ;; - stop) - stop - ;; - status) - echo -n "$DESC_APPSRV" - status -p $PIDFILE - ;; - *) - echo "Usage: $SCRIPTNAME {start|stop|status}" >&2 - exit 1 - ;; -esac -exit $? diff --git a/InfraStack/OSDependent/Linux/scripts/wimax.ume b/InfraStack/OSDependent/Linux/scripts/wimax.ume deleted file mode 100644 index 077fd0b..0000000 --- a/InfraStack/OSDependent/Linux/scripts/wimax.ume +++ /dev/null @@ -1,101 +0,0 @@ -#! /bin/sh -### BEGIN INIT INFO -# Provides: wimaxd -# Required-Start: $local_fs $remote_fs -# Required-Stop: $local_fs $remote_fs -# Default-Start: 2 3 4 5 -# Default-Stop: S 0 1 6 -# Short-Description: WiMAX Network Service daemon -# Description: This file starts/stops/restarts the WiMAX Network Service daemon. -### END INIT INFO - -DESC_APPSRV="WiMAX Network Service" -DNAME=wimaxd -NAME=wimax -BINDIR=VALUE -VARRUNPATH=VARRUNDIR -DAEMONSCRIPTDIR=DAEMONDIR -DAEMON=$BINDIR/$DNAME -DAEMON_ARGS= -PIDFILE=$VARRUNPATH/$DNAME.pid -SCRIPTNAME=$DAEMONSCRIPTDIR/$NAME - -# Exit if the package is not installed -[ -x "$DAEMON" ] || exit 0 - -# Load the VERBOSE setting and other rcS variables -[ -f /etc/default/rcS ] && . /etc/default/rcS - -# Define LSB log_* functions. -# Depend on lsb-base (>= 3.0-6) to ensure that this file is present. -. /lib/lsb/init-functions - -# -# Function that starts the daemon/service -# -do_start_appsrv() -{ - # Return - # 0 if daemon has been started - # 1 if daemon was already running - # 2 if daemon could not be started - if [ -f $PIDFILE ] && kill -0 $(cat $PIDFILE) >/dev/null 2>&1 - then - PID=`cat $PIDFILE` - echo "$DESC_APPSRV already running:$PID" - return 1 - fi - start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON || return 2 -} - -# -# Function that stops the daemon/service -# -do_stop_appsrv() -{ - # Return - # 0 if daemon has been stopped - # 1 if daemon was already stopped - # 2 if daemon could not be stopped - # other if a failure occurred - start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE - RETVAL="$?" - rm -f $PIDFILE - [ "$RETVAL" = 2 ] && return 2 - return "$RETVAL" -} - -case "$1" in - start) - [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC_APPSRV" - do_start_appsrv - case "$?" in - 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; - 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; - esac - sleep 2 - ;; - stop) - [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC_APPSRV" - do_stop_appsrv - case "$?" in - 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; - 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; - esac - sleep 2 - ;; - status) - echo -n "$DESC_APPSRV: " - pidofproc -p $PIDFILE >/dev/null - RETVAL="$?" - if [ $RETVAL -eq 0 ]; then - echo "Running" - else - echo "Not Running" - fi - ;; - *) - echo "Usage: $SCRIPTNAME {start|stop|status}" >&2 - exit 3 - ;; -esac diff --git a/InfraStack/OSDependent/Linux/scripts/wimax_appsrv.so.conf b/InfraStack/OSDependent/Linux/scripts/wimax_appsrv.so.conf deleted file mode 100644 index 9f9e3a9..0000000 --- a/InfraStack/OSDependent/Linux/scripts/wimax_appsrv.so.conf +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/wimax_appsrv |