Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2014-11-06 19:36:42 +0300
committerCorinna Vinschen <corinna@vinschen.de>2014-11-06 19:36:42 +0300
commit0f3cacfaa584f98abbc6eee987044c28f1d71156 (patch)
tree68aee11f2171721e089bc992f31b2e46f6a88fd8 /winsup/cygserver
parentdfc361dad46347fea1089fff9ecd4dd3235703d3 (diff)
* cygserver-config: Add -N option to allow different service name.
Diffstat (limited to 'winsup/cygserver')
-rw-r--r--winsup/cygserver/ChangeLog4
-rwxr-xr-xwinsup/cygserver/cygserver-config17
2 files changed, 16 insertions, 5 deletions
diff --git a/winsup/cygserver/ChangeLog b/winsup/cygserver/ChangeLog
index 1c4d11cb2..0b08894d2 100644
--- a/winsup/cygserver/ChangeLog
+++ b/winsup/cygserver/ChangeLog
@@ -1,3 +1,7 @@
+2014-11-06 Florian Friesdorf <flo@chaoflow.net>
+
+ * cygserver-config: Add -N option to allow different service name.
+
2014-08-15 Corinna Vinschen <corinna@vinschen.de>
* configure.ac: Convert to new AC_INIT style.
diff --git a/winsup/cygserver/cygserver-config b/winsup/cygserver/cygserver-config
index b8f441c3d..abe943c3f 100755
--- a/winsup/cygserver/cygserver-config
+++ b/winsup/cygserver/cygserver-config
@@ -10,6 +10,7 @@ LOCALSTATEDIR=/var
progname=$0
auto_answer=""
+service_name=cygserver
request()
{
@@ -63,6 +64,11 @@ do
auto_answer=no
;;
+ -N | --name )
+ service_name=$1
+ shift
+ ;;
+
*)
echo "usage: ${progname} [OPTION]..."
echo
@@ -72,6 +78,7 @@ do
echo " --debug -d Enable shell's debug output."
echo " --yes -y Answer all questions with \"yes\" automatically."
echo " --no -n Answer all questions with \"no\" automatically."
+ echo " --name -N <name> cygserver windows service name."
echo
exit 1
;;
@@ -84,10 +91,10 @@ _sys="`uname`"
_nt=`expr "${_sys}" : "CYGWIN_NT"`
# Check for running cygserver processes first.
-if ps -ef | grep -v grep | grep -q cygserver
+if ps -ef | grep -v grep | grep -q ${service_name}
then
echo
- echo "There is a cygserver already running. Nothing to do, apparently."
+ echo "There is a cygserver (${service_name}) already running. Nothing to do, apparently."
echo
exit 1
fi
@@ -164,7 +171,7 @@ fi
if [ ${_nt} -gt 0 ]
then
# But only if it is not already installed
- if ! cygrunsrv -Q cygserver > /dev/null 2>&1
+ if ! cygrunsrv -Q ${service_name} > /dev/null 2>&1
then
echo
echo
@@ -173,7 +180,7 @@ then
echo "Do you want to install cygserver as service?"
if request "(Say \"no\" if it's already installed as service)"
then
- if ! cygrunsrv -I cygserver -d "CYGWIN cygserver" -p /usr/sbin/cygserver
+ if ! cygrunsrv -I ${service_name} -d "CYGWIN cygserver" -p /usr/sbin/cygserver
then
echo
echo "Installation of cygserver as service failed. Please check the"
@@ -186,7 +193,7 @@ then
fi
echo
echo "The service has been installed under LocalSystem account."
- echo "To start it, call \`net start cygserver' or \`cygrunsrv -S cygserver'."
+ echo "To start it, call \`net start ${service_name}' or \`cygrunsrv -S ${service_name}'."
fi
touch "${LOCALSTATEDIR}/log/cygserver.log"
chown 18.544 "${LOCALSTATEDIR}/log/cygserver.log"