Commit 58ad4459 authored by Bernd Schubert's avatar Bernd Schubert

Convert from "fhgfs_" to "fhgfs-" in /etc

Packages are called fhgfs-... now and for clean packaging
(debian complains as usual) config files and init scripts also should
not have an underscore, but should have a dash.

It also fixes a few forgotten config files in debian/rules.in

git-svn-id: https://svn.itwm.fhg.de/svn/fsdevel/projects@1973 06d474eb-e7fd-0310-b1d4-fdbe02cb80bc
parent c4c895fa
......@@ -49,9 +49,11 @@ install: build
dh_installdirs
# manual installation
install -D dist/etc/init.d/fhgfs_admon.init.debian debian/__NAME__.init
install -D dist/etc/default/fhgfs_admon debian/__NAME__.default
install -D dist/etc/init.d/__NAME__.init.debian debian/__NAME__.init
install -D fhgfs_admon $(DEB_BUILD_ROOT)/opt/fhgfs/sbin/fhgfs_admon
install -D -m644 dist/etc/default/__NAME__ debian/__NAME__.default
install -D -m644 dist/etc/__NAME__.conf $(DEB_BUILD_ROOT)/etc/fhgfs/__NAME__.conf
mkdir -p $(DEB_BUILD_ROOT)/opt/fhgfs/setup
cp -R __FHGFS_SETUP_PATH__/source/* $(DEB_BUILD_ROOT)/opt/fhgfs/setup/
......
#! /bin/sh
### BEGIN INIT INFO
# Provides: fhgfs_admon
# Provides: fhgfs-admon
# Required-Start: $network
# Should-Start:
# Required-Stop: $network
......@@ -16,18 +16,13 @@
SERVICE_NAME="FhGFS Admon"
DAEMON=/opt/fhgfs/sbin/fhgfs_admon
CONFIG=/etc/fhgfs/fhgfs_admon.conf
CONFIG=/etc/fhgfs/fhgfs-admon.conf
DAEMON_ARGS="cfgFile=${CONFIG}"
SCRIPTNAME=/etc/init.d/$NAME
ADMON_LIB_DIR=/opt/fhgfs/lib
# path to fhgfs_opentk_lib
FHGFS_LIB_DIR=/opt/fhgfs/lib/fhgfs
SYSCONFIG_FILE=/etc/sysconfig/fhgfs
export LD_LIBRARY_PATH=${ADMON_LIB_DIR}/cxxtools:${ADMON_LIB_DIR}/sqlite:${ADMON_LIB_DIR}/tntnet:${FHGFS_LIB_DIR}:${ADMON_LIB_DIR}/fhgfs_admon
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
......@@ -131,7 +126,7 @@ case "$1" in
esac
;;
*)
echo "Usage: $SCRIPTNAME {start|stop|restart|reload}" >&2
echo "Usage: $0 {start|stop|restart|reload}" >&2
exit 3
;;
esac
......
#!/bin/sh
#
### BEGIN INIT INFO
# Provides: fhgfs_admon
# Provides: fhgfs-admon
# Required-Start: $network
# Should-Start:
# Required-Stop: $network
......@@ -14,14 +14,7 @@
APP_NAME="FhGFS Admon"
# path to libs shipped with admon
ADMON_LIB_DIR=/opt/fhgfs/lib
# path to fhgfs_opentk_lib
FHGFS_LIB_DIR=/opt/fhgfs/lib/fhgfs
SYSCONFIG_FILE=/etc/sysconfig/fhgfs
export LD_LIBRARY_PATH=${ADMON_LIB_DIR}/cxxtools:${ADMON_LIB_DIR}/sqlite:${ADMON_LIB_DIR}/tntnet:${FHGFS_LIB_DIR}:${ADMON_LIB_DIR}/fhgfs_admon
SYSCONFIG_FILE=/etc/sysconfig/fhgfs-admon
# Check for missing binaries (stale symlinks should not happen)
# Note: Special treatment of stop for LSB conformance
......@@ -31,7 +24,7 @@ test -x $APP_BIN || { echo "$APP_BIN not installed";
else exit 5; fi; }
# Check for existence of needed config file and read it
APP_CONFIG=/etc/fhgfs/fhgfs_admon.conf
APP_CONFIG=/etc/fhgfs/fhgfs-admon.conf
test -r $APP_CONFIG || { echo "$APP_CONFIG not existing";
if [ "$1" = "stop" ]; then exit 0;
else exit 6; fi; }
......
#!/bin/sh
#
### BEGIN INIT INFO
# Provides: fhgfs_admon
# Provides: fhgfs-admon
# Required-Start: $network
# Should-Start:
# Required-Stop: $network
......@@ -12,10 +12,8 @@
# Description: Start FhGFS Admon
### END INIT INFO
export LD_LIBRARY_PATH=/opt/fhgfs/lib/fhgfs:/opt/fhgfs/lib/fhgfs_admon:/opt/fhgfs/lib/cxxtools:/opt/fhgfs/lib/tntnet:/opt/fhgfs/lib/sqlite
APP_NAME="FhGFS Admon"
SYSCONFIG_FILE=/etc/sysconfig/fhgfs
SYSCONFIG_FILE=/etc/sysconfig/fhgfs-admon
# Check for missing binaries (stale symlinks should not happen)
# Note: Special treatment of stop for LSB conformance
......@@ -26,7 +24,7 @@ test -x $ADMON_BIN || { echo "$ADMON_BIN not installed";
else exit 5; fi; }
# Check for existence of needed config file and read it
ADMON_CONFIG=/etc/fhgfs/fhgfs_admon.conf
ADMON_CONFIG=/etc/fhgfs/fhgfs-admon.conf
test -r $ADMON_CONFIG || { echo "$ADMON_CONFIG not existing";
if [ "$1" = "stop" ]; then exit 0;
else exit 6; fi; }
......
......@@ -86,18 +86,18 @@ cp dist/etc/*.conf ${RPM_BUILD_ROOT}/etc/fhgfs/
mkdir -p ${RPM_BUILD_ROOT}/etc/init.d/
if [ -f /etc/redhat-release ]; then
INITSCRIPT="dist/etc/init.d/fhgfs_admon.init.rh"
INITSCRIPT="dist/etc/init.d/%NAME%.init.rh"
elif [ -f /etc/SuSE-release ]; then
INITSCRIPT="dist/etc/init.d/fhgfs_admon.init.suse"
INITSCRIPT="dist/etc/init.d/%NAME%.init.suse"
else
echo "Warning unknown distribution, will use RedHat init script"
INITSCRIPT="dist/etc/init.d/fhgfs_admon.init.rh"
INITSCRIPT="dist/etc/init.d/%NAME%.init.rh"
fi
cp $INITSCRIPT ${RPM_BUILD_ROOT}/etc/init.d/fhgfs_admon
cp $INITSCRIPT ${RPM_BUILD_ROOT}/etc/init.d/%NAME%
install -D fhgfs_admon ${RPM_BUILD_ROOT}/opt/fhgfs/sbin/fhgfs_admon
install -D dist/etc/default/fhgfs_admon ${RPM_BUILD_ROOT}/etc/default/fhgfs_admon
install -D dist/etc/default/%NAME% ${RPM_BUILD_ROOT}/etc/default/%NAME%
mkdir -p ${RPM_BUILD_ROOT}/opt/fhgfs/setup
......@@ -118,16 +118,16 @@ else
fi
%post
chkconfig fhgfs_admon on
chkconfig %NAME% on
%preun
chkconfig fhgfs_admon off
chkconfig %NAME% off
%files
%defattr(-,root,root)
%config(noreplace) /etc/fhgfs/*
%config(noreplace) /etc/default/fhgfs_admon
/etc/init.d/fhgfs_admon
%config(noreplace) /etc/default/%NAME%
/etc/init.d/%NAME%
/opt/fhgfs/sbin/fhgfs_admon
/opt/fhgfs/fhgfs_admon_gui/fhgfs_admon_gui.jar
/opt/fhgfs/setup/fhgfs*
......
......@@ -24,14 +24,14 @@ ADMON_GUI_PATH=${ADMON_GUI_PATH:-`readlink -f ../../fhgfs_admon_gui/fhgfs_admon_
pushd $TOOLS_ROOT
tar czf $BUILD/buildroot/SOURCES/${NAME}-${VER}-$RELEASE_STR.tgz --exclude=buildroot/* *
cd $BUILD
sed -e "s#%FHGFS_OPENTK_PATH%#$FHGFS_OPENTK_PATH#" \
-e "s#%FHGFS_COMMON_PATH%#$FHGFS_COMMON_PATH#" \
-e "s#%FHGFS_SETUP_PATH%#$FHGFS_SETUP_PATH#" \
-e "s#%ADMON_GUI_PATH%#$ADMON_GUI_PATH#" \
-e "s#%JAVA_HOME%#$JAVA_HOME#" \
-e "s/%NAME%/$NAME/" \
-e "s/%RELEASE_STR%/$RELEASE_STR/" \
-e "s/%VER%/$VER/" \
sed -e "s#%FHGFS_OPENTK_PATH%#$FHGFS_OPENTK_PATH#g" \
-e "s#%FHGFS_COMMON_PATH%#$FHGFS_COMMON_PATH#g" \
-e "s#%FHGFS_SETUP_PATH%#$FHGFS_SETUP_PATH#g" \
-e "s#%ADMON_GUI_PATH%#$ADMON_GUI_PATH#g" \
-e "s#%JAVA_HOME%#$JAVA_HOME#g" \
-e "s/%NAME%/$NAME/g" \
-e "s/%RELEASE_STR%/$RELEASE_STR/g" \
-e "s/%VER%/$VER/g" \
-e "s#__ADMON_GUI_EXTERNAL_JAR_PATH__#$ADMON_GUI_EXTERNAL_JAR_PATH#g" \
${SPEC_FILE}.in > ${SPEC_FILE}
......
......@@ -7,7 +7,7 @@ AUTO_REBUILD_KVER_CURRENT = $(shell uname -srvmpi)
AUTO_REBUILD_LOG_PREFIX := "FhGFS Client Auto-Rebuild:"
# config file (keys)
AUTO_REBUILD_CONF_FILE := /etc/fhgfs/fhgfs_client_autobuild.conf
AUTO_REBUILD_CONF_FILE := /etc/fhgfs/fhgfs-client-autobuild.conf
AUTO_REBUILD_CONF_ENABLED_KEY := buildEnabled
AUTO_REBUILD_CONF_BUILDARGS_KEY := buildArgs
......
......@@ -48,8 +48,11 @@ install: build
KDIR=__KDIR__ \
WITHOUT_OPENTK=1 V=1 prepare_release
install -D dist/etc/init.d/fhgfs_client.init.debian debian/fhgfs_client.init
install -D dist/etc/default/fhgfs_client debian/fhgfs_client.default
install -D dist/etc/init.d/__NAME__.init.debian debian/__NAME__.init
install -D -m644 dist/etc/default/__NAME__ debian/__NAME__.default
install -D -m644 dist/etc/__NAME__.conf $(DEB_BUILD_ROOT)/etc/fhgfs/__NAME__.conf
install -D -m644 dist/etc/__NAME__-autobuild.conf $(DEB_BUILD_ROOT)/etc/fhgfs/__NAME__-autobuild.conf
install -D -m644 dist/etc/fhgfs-mounts.conf $(DEB_BUILD_ROOT)/etc/fhgfs/fhgfs-mounts.conf
# Build architecture-independent files here.
binary-indep:
......@@ -64,7 +67,7 @@ binary-arch: build install
dh_installdocs
dh_installexamples
dh_installinit --no-restart-on-upgrade --no-start -- start 99 2 3 4 5 . stop 99 2 3 4 5 .
dh_installinit --no-restart-on-upgrade --no-start -- start 99 2 3 4 5 . stop 99 0 1 6 .
# dh_install
dh_installman
dh_link
......
/mnt/fhgfs /etc/fhgfs/fhgfs-client.conf
......@@ -4,11 +4,11 @@ set -e
#
### BEGIN INIT INFO
# Provides: fhgfs_client
# Provides: fhgfs-client
# Required-Start: $network $local_fs
# Should-Start: fhgfs_helperd fhgfs_meta fhgfs_storage openibd
# Should-Start: fhgfs-helperd fhgfs-meta fhgfs-storage openibd
# Required-Stop: $network $local_fs
# Should-Stop: fhgfs_helperd fhgfs_meta fhgfs_storage openibd
# Should-Stop: fhgfs-helperd fhgfs_meta fhgfs-storage openibd
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: FhGFS Client
......@@ -22,9 +22,9 @@ SERVICE_NAME="FhGFS Client"
CLIENT_MOD=fhgfs_client
CLIENT_OPENTK_MOD=fhgfs_client_opentk
SYSCONFIG_FILE=/etc/default/fhgfs_client
SYSCONFIG_FILE=/etc/default/fhgfs-client
FHGFS_MOUNT_CONF="/etc/fhgfs/fhgfs_mounts.conf"
FHGFS_MOUNT_CONF="/etc/fhgfs/fhgfs-mounts.conf"
FORCE_AUTO_BUILD="/var/lib/fhgfs/client/force-auto-build"
......@@ -81,7 +81,7 @@ case "$1" in
fi
set -e
echo "- Mounting directories from /etc/fhgfs/fhgfs_mounts.conf"
echo "- Mounting directories from $FHGFS_MOUNT_CONF"
OLDIFS="$IFS"
IFS=$'\n'
......@@ -111,7 +111,7 @@ case "$1" in
echo "Shutting down ${SERVICE_NAME}: "
RETVAL=$?
echo "- Unmounting directories from /etc/fhgfs/fhgfs_mounts.conf"
echo "- Unmounting directories from $FHGFS_MOUNT_CONF"
OLDIFS="$IFS"
IFS=$'\n'
file=`cat $FHGFS_MOUNT_CONF` # we have to read all lines at once
......
......@@ -4,11 +4,11 @@ set -e
#
### BEGIN INIT INFO
# Provides: fhgfs_client
# Provides: fhgfs-client
# Required-Start: $network
# Should-Start: fhgfs_helperd fhgfs_meta fhgfs_storage openibd
# Should-Start: fhgfs-helperd fhgfs-meta fhgfs-storage openibd
# Required-Stop: $network
# Should-Stop: fhgfs_helperd fhgfs_meta fhgfs_storage openibd
# Should-Stop: fhgfs-helperd fhgfs-meta fhgfs-storage openibd
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# chkconfig: 35 99 5
......@@ -23,9 +23,9 @@ SERVICE_NAME="FhGFS Client"
CLIENT_MOD=fhgfs_client
CLIENT_OPENTK_MOD=fhgfs_client_opentk
SYSCONFIG_FILE=/etc/default/fhgfs_client
SYSCONFIG_FILE=/etc/default/fhgfs-client
FHGFS_MOUNT_CONF="/etc/fhgfs/fhgfs_mounts.conf"
FHGFS_MOUNT_CONF="/etc/fhgfs/fhgfs-mounts.conf"
# Check for existence of needed config file and read it
#CONFIG=/etc/fhgfs/fhgfs_client.conf
......@@ -85,7 +85,7 @@ case "$1" in
fi
set -e
echo "- Mounting directories from /etc/fhgfs/fhgfs_mounts.conf"
echo "- Mounting directories from $FHGFS_MOUNT_CONF"
OLDIFS="$IFS"
IFS=$'\n'
......@@ -116,7 +116,7 @@ case "$1" in
echo "Shutting down ${SERVICE_NAME}: "
RETVAL=$?
echo "- Unmounting directories from /etc/fhgfs/fhgfs_mounts.conf"
echo "- Unmounting directories from $FHGFS_MOUNT_CONF"
OLDIFS="$IFS"
IFS=$'\n'
file=`cat $FHGFS_MOUNT_CONF` # we have to read all lines at once
......
......@@ -11,11 +11,11 @@ set -e
#
### BEGIN INIT INFO
# Provides: fhgfs_client
# Provides: fhgfs-client
# Required-Start: $network
# Should-Start: fhgfs_helperd fhgfs_meta fhgfs_storage openibd
# Should-Start: fhgfs-helperd fhgfs-meta fhgfs-storage openibd
# Required-Stop: $network
# Should-Stop: fhgfs_helperd fhgfs_meta fhgfs_storage openibd
# Should-Stop: fhgfs-helperd fhgfs-meta fhgfs-storage openibd
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Short-Description: FhGFS Client
......
......@@ -34,7 +34,7 @@
#
# fhgfs-client configuration RPM creator
# %NAME% configuration RPM creator
#
Summary: fhgfs client package
Name: %NAME%
......@@ -46,7 +46,7 @@ Source: %NAME%-%{ver}-%{release_str}.tgz
URL: http://www.fhgfs.com
Vendor: Fraunhofer ITWM
BuildRoot: %{_tmppath}/%NAME%-root
requires: fhgfs-client-opentk-src
requires: %NAME%-opentk-src
%description
This package contains binary objects of the closed source part of FhGFS and
......@@ -75,20 +75,20 @@ cp dist/etc/*.conf ${RPM_BUILD_ROOT}/etc/fhgfs/
mkdir -p ${RPM_BUILD_ROOT}/etc/init.d/
if [ -f /etc/redhat-release ]; then
INITSCRIPT="dist/etc/init.d/fhgfs_client.init.rh"
INITSCRIPT="dist/etc/init.d/%NAME%.init.rh"
elif [ -f /etc/SuSE-release ]; then
INITSCRIPT="dist/etc/init.d/fhgfs_client.init.suse"
INITSCRIPT="dist/etc/init.d/%NAME%.init.suse"
else
echo "Warning unknown distribution, will use RedHat init script"
INITSCRIPT="dist/etc/init.d/fhgfs_client.init.rh"
INITSCRIPT="dist/etc/init.d/%NAME%.init.rh"
fi
cp -a $INITSCRIPT ${RPM_BUILD_ROOT}/etc/init.d/fhgfs_client
cp -a $INITSCRIPT ${RPM_BUILD_ROOT}/etc/init.d/%NAME%
install -D dist/etc/default/fhgfs_client ${RPM_BUILD_ROOT}/etc/default/fhgfs_client
install -D dist/etc/default/%NAME% ${RPM_BUILD_ROOT}/etc/default/%NAME%
%post
chkconfig fhgfs_client on
rm -fr /lib/modules/`uname -r`/updates/fs/fhgfs_autobuild
chkconfig %NAME% on
rm -fr /lib/modules/`uname -r`/updates/fs/fhgfs-autobuild
%preun
chkconfig fhgfs_client off
......@@ -97,6 +97,6 @@ chkconfig fhgfs_client off
%files
%defattr(-,root,root)
%config(noreplace) /etc/fhgfs/*
%config(noreplace) /etc/default/fhgfs_client
/etc/init.d/fhgfs_client
%config(noreplace) /etc/default/%NAME%
/etc/init.d/%NAME%
/opt/fhgfs/src/client/*
......@@ -18,15 +18,15 @@ CHANGELOG="debian/changelog"
RULES="debian/rules"
sed \
-e "s/__NAME__/$NAME/" \
-e "s/__FHGFS_VERSION__/$FHGFS_VERSION/" \
-e "s/__NAME__/$NAME/g" \
-e "s/__FHGFS_VERSION__/$FHGFS_VERSION/g" \
${CHANGELOG}.in > ${CHANGELOG}
sed \
-e "s#__FHGFS_CLIENT_OPENTK_PATH__#$FHGFS_CLIENT_OPENTK_PATH#" \
-e "s/__FHGFS_VERSION__/$FHGFS_VERSION/" \
-e "s/__NAME__/$NAME/" \
-e "s#__KDIR__#$KDIR#" \
-e "s#__FHGFS_CLIENT_OPENTK_PATH__#$FHGFS_CLIENT_OPENTK_PATH#g" \
-e "s/__FHGFS_VERSION__/$FHGFS_VERSION/g" \
-e "s/__NAME__/$NAME/g" \
-e "s#__KDIR__#$KDIR#g" \
${RULES}.in > ${RULES}
chmod +x debian/rules
......
......@@ -22,10 +22,10 @@ FHGFS_CLIENT_OPENTK_PATH=`readlink -f $FHGFS_CLIENT_OPENTK_PATH` # make absolute
pushd $TOOLS_ROOT
tar czf $BUILD/buildroot/SOURCES/${NAME}-${VER}-$RELEASE_STR.tgz --exclude=buildroot/* *
cd $BUILD
sed -e "s#%FHGFS_CLIENT_OPENTK_PATH%#$FHGFS_CLIENT_OPENTK_PATH#" \
-e "s/%NAME%/$NAME/" \
-e "s/%RELEASE_STR%/$RELEASE_STR/" \
-e "s/%VER%/$VER/" \
sed -e "s#%FHGFS_CLIENT_OPENTK_PATH%#$FHGFS_CLIENT_OPENTK_PATH#g" \
-e "s/%NAME%/$NAME/g" \
-e "s/%RELEASE_STR%/$RELEASE_STR/g" \
-e "s/%VER%/$VER/g" \
${SPEC_FILE}.in > ${SPEC_FILE}
rpmbuild --clean -bb ${SPEC_FILE} --define "_topdir $BUILD/buildroot/" --define "__os_install_post %{nil}" --define "__debug_install_post %{nil}"
......
......@@ -16,19 +16,19 @@ CHANGELOG="debian/changelog"
RULES="debian/rules"
sed \
-e "s/__NAME__/$NAME/" \
-e "s/__FHGFS_VERSION__/$FHGFS_VERSION/" \
-e "s/__NAME__/$NAME/g" \
-e "s/__FHGFS_VERSION__/$FHGFS_VERSION/g" \
${CHANGELOG}.in > ${CHANGELOG}
sed \
-e "s/__FHGFS_VERSION__/$FHGFS_VERSION/" \
-e "s/__NAME__/$NAME/" \
-e "s/__FHGFS_VERSION__/$FHGFS_VERSION/g" \
-e "s/__NAME__/$NAME/g" \
${RULES}.in > ${RULES}
chmod +x debian/rules
#cp debian/package.lintian-overrides.in debian/${NAME}.lintian-overrides
#sed -i -e "s/__NAME__/$NAME/" debian/${NAME}.lintian-overrides
#sed -i -e "s/__NAME__/$NAME/g" debian/${NAME}.lintian-overrides
# build the package and supress lintian warnings. Lintian in Lenny cannot
# do that itself yet
......
......@@ -21,10 +21,10 @@ FHGFS_CLIENT_OPENTK_PATH=${FHGFS_CLIENT_OPENTK_PATH:-`readlink -f ../../fhgfs_cl
pushd $TOOLS_ROOT
tar czf $BUILD/buildroot/SOURCES/${NAME}-${VER}-$RELEASE_STR.tgz --exclude=buildroot/* *
cd $BUILD
sed -e "s#%FHGFS_CLIENT_OPENTK_PATH%#$FHGFS_CLIENT_OPENTK_PATH#" \
-e "s/%NAME%/$NAME/" \
-e "s/%RELEASE_STR%/$RELEASE_STR/" \
-e "s/%VER%/$VER/" \
sed -e "s#%FHGFS_CLIENT_OPENTK_PATH%#$FHGFS_CLIENT_OPENTK_PATH#g" \
-e "s/%NAME%/$NAME/g" \
-e "s/%RELEASE_STR%/$RELEASE_STR/g" \
-e "s/%VER%/$VER/g" \
${SPEC_FILE}.in > ${SPEC_FILE}
rpmbuild --clean -bb ${SPEC_FILE} --define "_topdir $BUILD/buildroot/" --define "__os_install_post %{nil}" --define "__debug_install_post %{nil}"
......
......@@ -41,8 +41,9 @@ install: build
dh_installdirs
# manual installation
install -D dist/etc/init.d/fhgfs_helperd.init.debian debian/__NAME__.init
install -D dist/etc/default/fhgfs_helperd debian/__NAME__.default
install -D dist/etc/init.d/__NAME__.init.debian debian/__NAME__.init
install -D -m644 dist/etc/default/__NAME__ debian/__NAME__.default
install -D -m644 dist/etc/__NAME__.conf $(DEB_BUILD_ROOT)/etc/fhgfs/__NAME__.conf
install -D fhgfs_helperd $(DEB_BUILD_ROOT)/opt/fhgfs/sbin/fhgfs_helperd
# Build architecture-independent files here.
......@@ -58,7 +59,7 @@ binary-arch: build install
dh_installdocs
dh_installexamples
dh_installinit --no-restart-on-upgrade --no-start -- start 99 2 3 4 5 . stop 99 2 3 4 5 .
dh_installinit --no-restart-on-upgrade --no-start -- start 99 2 3 4 5 . stop 99 0 1 6 .
dh_installman
dh_link
dh_strip
......
......@@ -16,11 +16,10 @@
SERVICE_NAME="FhGFS Client Helper Daemon"
DAEMON=/opt/fhgfs/sbin/fhgfs_helperd
CONFIG=/etc/fhgfs/fhgfs_helperd.conf
CONFIG=/etc/fhgfs/fhgfs-helperd.conf
DAEMON_ARGS="cfgFile=${CONFIG}"
SCRIPTNAME=/etc/init.d/$NAME
SYSCONFIG_FILE=/etc/default/fhgfs_helperd
SYSCONFIG_FILE=/etc/default/fhgfs-helperd
#export LD_LIBRARY_PATH=/opt/fhgfs/lib/fhgfs
......@@ -124,7 +123,7 @@ case "$1" in
esac
;;
*)
echo "Usage: $SCRIPTNAME {start|stop|restart|reload}" >&2
echo "Usage: $0 {start|stop|restart|reload}" >&2
exit 3
;;
esac
......
......@@ -28,12 +28,12 @@ test -x $APP_BIN || { echo "$APP_BIN not installed";
else exit 5; fi; }
# Check for existence of needed config file and read it
APP_CONFIG=/etc/fhgfs/fhgfs_helperd.conf
APP_CONFIG=/etc/fhgfs/fhgfs-helperd.conf
test -r $APP_CONFIG || { echo "$APP_CONFIG not existing";
if [ "$1" = "stop" ]; then exit 0;
else exit 6; fi; }
SYSCONFIG_FILE=/etc/default/fhgfs_helperd
SYSCONFIG_FILE=/etc/default/fhgfs-helperd
# source function library
......
......@@ -33,12 +33,12 @@ test -x $SERVER_BIN || { echo "$SERVER_BIN not installed";
else exit 5; fi; }
# Check for existence of needed config file and read it
SERVER_CONFIG=/etc/fhgfs/fhgfs_helperd.conf
SERVER_CONFIG=/etc/fhgfs/fhgfs-helperd.conf
test -r $SERVER_CONFIG || { echo "$SERVER_CONFIG not existing";
if [ "$1" = "stop" ]; then exit 0;
else exit 6; fi; }
SYSCONFIG_FILE=/etc/default/fhgfs_helperd
SYSCONFIG_FILE=/etc/default/fhgfs-helperd
. /etc/rc.status
......
......@@ -73,28 +73,28 @@ mkdir -p ${RPM_BUILD_ROOT}/etc/fhgfs/
cp -a dist/etc/*.conf ${RPM_BUILD_ROOT}/etc/fhgfs/
if [ -f /etc/redhat-release ]; then
INITSCRIPT="dist/etc/init.d/fhgfs_helperd.init.rh"
INITSCRIPT="dist/etc/init.d/%NAME%.init.rh"
elif [ -f /etc/SuSE-release ]; then
INITSCRIPT="dist/etc/init.d/fhgfs_helperd.init.suse"
INITSCRIPT="dist/etc/init.d/%NAME%.init.suse"
else
echo "Warning unknown distribution, will use RedHat init script"
INITSCRIPT="dist/etc/init.d/fhgfs_helperd.init.rh"
INITSCRIPT="dist/etc/init.d/%NAME%.init.rh"
fi
install -D $INITSCRIPT ${RPM_BUILD_ROOT}/etc/init.d/fhgfs_helperd
install -D $INITSCRIPT ${RPM_BUILD_ROOT}/etc/init.d/%NAME%
install -D fhgfs_helperd ${RPM_BUILD_ROOT}/opt/fhgfs/sbin/fhgfs_helperd
install -D dist/etc/default/fhgfs_helperd ${RPM_BUILD_ROOT}/etc/default/fhgfs_helperd
install -D dist/etc/default/%NAME% ${RPM_BUILD_ROOT}/etc/default/%NAME%
%post
chkconfig fhgfs_helperd on
chkconfig %NAME% on
%preun
chkconfig fhgfs_helperd off
chkconfig %NAME% off
%files
%defattr(-,root,root)
%config(noreplace) /etc/fhgfs/*
%config(noreplace) /etc/default/fhgfs_helperd
/etc/init.d/fhgfs_helperd
/opt/fhgfs/sbin/fhgfs_helperd
%config(noreplace) /etc/default/%NAME%
/etc/init.d/%NAME%
/opt/fhgfs/sbin/fhgfs_helperd
......@@ -17,21 +17,21 @@ CHANGELOG="debian/changelog"
RULES="debian/rules"
sed \
-e "s/__NAME__/$NAME/" \
-e "s/__FHGFS_VERSION__/$FHGFS_VERSION/" \
-e "s/__NAME__/$NAME/g" \
-e "s/__FHGFS_VERSION__/$FHGFS_VERSION/g" \
${CHANGELOG}.in > ${CHANGELOG}
sed \
-e "s#__FHGFS_OPENTK_PATH__#$FHGFS_OPENTK_PATH#" \
-e "s#__FHGFS_COMMON_PATH__#$FHGFS_COMMON_PATH#" \
-e "s/__FHGFS_VERSION__/$FHGFS_VERSION/" \
-e "s/__NAME__/$NAME/" \
-e "s#__FHGFS_OPENTK_PATH__#$FHGFS_OPENTK_PATH#g" \
-e "s#__FHGFS_COMMON_PATH__#$FHGFS_COMMON_PATH#g" \
-e "s/__FHGFS_VERSION__/$FHGFS_VERSION/g" \
-e "s/__NAME__/$NAME/g" \
${RULES}.in > ${RULES}
chmod +x debian/rules
#cp debian/package.lintian-overrides.in debian/${NAME}.lintian-overrides
#sed -i -e "s/__NAME__/$NAME/" debian/${NAME}.lintian-overrides
#sed -i -e "s/__NAME__/$NAME/g" debian/${NAME}.lintian-overrides
# build the package and supress lintian warnings. Lintian in Lenny cannot
# do that itself yet
......
......@@ -23,11 +23,11 @@ FHGFS_COMMON_PATH=${FHGFS_COMMON_PATH:-`readlink -f ../../fhgfs_common`}
pushd $TOOLS_ROOT
tar czf $BUILD/buildroot/SOURCES/${NAME}-${VER}-$RELEASE_STR.tgz --exclude=buildroot/* *
cd $BUILD
sed -e "s#%FHGFS_OPENTK_PATH%#$FHGFS_OPENTK_PATH#" \
-e "s#%FHGFS_COMMON_PATH%#$FHGFS_COMMON_PATH#" \
-e "s/%NAME%/$NAME/" \
-e "s/%RELEASE_STR%/$RELEASE_STR/" \
-e "s/%VER%/$VER/" \
sed -e "s#%FHGFS_OPENTK_PATH%#$FHGFS_OPENTK_PATH#g" \
-e "s#%FHGFS_COMMON_PATH%#$FHGFS_COMMON_PATH#g" \
-e "s/%NAME%/$NAME/g" \
-e "s/%RELEASE_STR%/$RELEASE_STR/g" \
-e "s/%VER%/$VER/g" \
${SPEC_FILE}.in > ${SPEC_FILE}
rpmbuild --clean -bb ${SPEC_FILE} --define "_topdir $BUILD/buildroot/" --define "__os_install_post %{nil}" --define "__debug_install_post %{nil}"
......
......@@ -41,9 +41,10 @@ install: build
dh_installdirs
# manual installation
install -D dist/etc/init.d/fhgfs_meta.init.debian debian/__NAME__.init
install -D dist/etc/default/fhgfs_meta debian/__NAME__.default
install -D dist/etc/init.d/__NAME__.init.debian debian/__NAME__.init
install -D fhgfs_meta $(DEB_BUILD_ROOT)/opt/fhgfs/sbin/fhgfs_meta
install -D -m644 dist/etc/default/__NAME__ debian/__NAME__.default
install -D -m644 dist/etc/__NAME__.conf $(DEB_BUILD_ROOT)/etc/fhgfs/__NAME__.conf
# Build architecture-independent files here.
binary-indep:
......
#! /bin/sh
### BEGIN INIT INFO
# Provides: fhgfs_meta
# Provides: fhgfs-meta
# Required-Start: $network
# Should-Start: fhgfs_storage openibd
# Required-Stop: $network
......@@ -15,15 +15,15 @@
#
DESC="FhGFS Meta Server"
SERVICE_NAME=fhgfs_meta
SERVICE_NAME=fhgfs-meta
SERVICE_UNLOCK=/opt/fhgfs/sbin/fhgfs_service_unlock.sh
SERVICE_STORAGE_KEY=storeMetaDirectory
DAEMON=/opt/fhgfs/sbin/${SERVICE_NAME}
DAEMON=/opt/fhgfs/sbin/fhgfs_meta
CONFIG=/etc/fhgfs/${SERVICE_NAME}.conf
DAEMON_ARGS="cfgFile=${CONFIG}"
SCRIPTNAME=/etc/init.d/$NAME
SYSCONFIG_FILE=/etc/default/fhgfs
SYSCONFIG_FILE=/etc/default/fhgfs/${SERVICE_NAME}.conf
#export LD_LIBRARY_PATH=/opt/fhgfs/lib/fhgfs
......
#!/bin/sh
#
### BEGIN INIT INFO
# Provides: fhgfs_meta
# Provides: fhgfs-meta
# Required-Start: $network
# Should-Start: fhgfs_storage openibd
# Should-Start: fhgfs-storage openibd
# Required-Stop: $network
# Should-Stop: fhgfs_storage openibd
# Should-Stop: fhgfs-storage openibd
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# chkconfig: 35 95 9
......@@ -14,11 +14,11 @@
### END INIT INFO
APP_NAME="FhGFS Meta Server"
SERVICE_NAME=fhgfs_meta
SERVICE_NAME=fhgfs-meta
SERVICE_UNLOCK=/opt/fhgfs/sbin/fhgfs_service_unlock.sh
SERVICE_STORAGE_KEY=storeMetaDirectory
SYSCONFIG_FILE=/etc/default/fhgfs_meta
SYSCONFIG_FILE=/etc/default/fhgfs-meta
# path to fhgfs_opentk_lib
FHGFS_LIB_DIR=/opt/fhgfs/lib/fhgfs
......@@ -27,7 +27,7 @@ FHGFS_LIB_DIR=/opt/fhgfs/lib/fhgfs
# Check for missing binaries (stale symlinks should not happen)
# Note: Special treatment of stop for LSB conformance
APP_BIN=/opt/fhgfs/sbin/${SERVICE_NAME}
APP_BIN=/opt/fhgfs/sbin/fhgfs_meta
test -x $APP_BIN || { echo "$APP_BIN not installed";
if [ "$1" = "stop" ]; then exit 0;