Skip to content

Commit dc1054c

Browse files
author
Karsten Schwank
committed
allow relocation of srmclient scripts
many of the srm scripts point to the generic srm script in /usr/sbin/srm without using considering $SRM_PATH. This causes problems if the scripts are installed in different locations than the ones defined in the RPM. This patch changes the default location of the generic srm script from /usr/sbin/srm to ${SRM_PATH}/sbin which is /usr/share/srm/sbin by default and changes all other scripts to use "${SRM_PATH}/sbin/srm", thus allowing relocation of the scripts. Ticket: http://rt.dcache.org/Ticket/Display.html?id=7989 Acked-by: Target: trunk Require-book: no Require-notes: yes
1 parent 77983be commit dc1054c

31 files changed

+61
-68
lines changed

modules/srmclient/src/main/assembly/dir.xml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,9 @@
2626
</excludes>
2727
</fileSet>
2828
<fileSet>
29-
<directory>${project.basedir}/src/main/sbin</directory>
30-
<outputDirectory>usr/sbin</outputDirectory>
29+
<directory>${project.basedir}/src/main/lib</directory>
30+
<outputDirectory>usr/share/srm/lib</outputDirectory>
3131
<fileMode>775</fileMode>
32-
<excludes>
33-
<exclude>make_release.sh</exclude>
34-
<exclude>sdn</exclude>
35-
<exclude>make-srmcp-rpm</exclude>
36-
<exclude>timeout.sh</exclude>
37-
<exclude>f-srmcp-prepare-and-make-in-user-space</exclude>
38-
</excludes>
3932
</fileSet>
4033
<fileSet>
4134
<directory>${project.basedir}/src/main/conf</directory>

modules/srmclient/src/main/bin/adler32

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#! /bin/sh
22

33
if [ -z "$SRM_PATH" ]; then
4-
SRM_PATH="/usr/share/srm"
4+
SRM_PATH="$(cd $(dirname $0)/../share/srm;pwd)"
55
fi
66

77
if [ ! -d "$SRM_PATH" ]; then
@@ -32,7 +32,7 @@ OPTIONS="-Djava.protocol.handler.pkgs=org.globus.net.protocol"
3232

3333
if [ "$SECURITY_DEBUG" = "true" ]
3434
then
35-
OPTIONS=" ${OPTIONS} -Dlogback.configurationFile=/usr/share/srm/conf/logback-all.xml"
35+
OPTIONS=" ${OPTIONS} -Dlogback.configurationFile=${SRM_PATH}/conf/logback-all.xml"
3636
fi
3737

3838
cmd="java -cp $SRM_CP $OPTIONS org.dcache.srm.util.Adler32 $*"
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22

33
if [ -z "$SRM_PATH" ]; then
4-
SRM_PATH="/usr/share/srm"
4+
SRM_PATH="$(cd $(dirname $0)/../share/srm;pwd)"
55
fi
66

77
if [ ! -d "$SRM_PATH" ]; then
@@ -11,4 +11,4 @@ fi
1111

1212
export SRM_PATH
1313

14-
/usr/sbin/srm -abortFiles $*
14+
"${SRM_PATH}/lib/srm" -abortFiles $*
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22

33
if [ -z "$SRM_PATH" ]; then
4-
SRM_PATH="/usr/share/srm"
4+
SRM_PATH="$(cd $(dirname $0)/../share/srm;pwd)"
55
fi
66

77
if [ ! -d "$SRM_PATH" ]; then
@@ -11,4 +11,4 @@ fi
1111

1212
export SRM_PATH
1313

14-
/usr/sbin/srm -abortRequest $*
14+
"${SRM_PATH}/lib/srm" -abortRequest $*
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22

33
if [ -z "$SRM_PATH" ]; then
4-
SRM_PATH="/usr/share/srm"
4+
SRM_PATH="$(cd $(dirname $0)/../share/srm;pwd)"
55
fi
66

77
if [ ! -d "$SRM_PATH" ]; then
@@ -11,4 +11,4 @@ fi
1111

1212
export SRM_PATH
1313

14-
/usr/sbin/srm -advisoryDelete $*
14+
"${SRM_PATH}/lib/srm" -advisoryDelete $*
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22

33
if [ -z "$SRM_PATH" ]; then
4-
SRM_PATH="/usr/share/srm"
4+
SRM_PATH="$(cd $(dirname $0)/../share/srm;pwd)"
55
fi
66

77
if [ ! -d "$SRM_PATH" ]; then
@@ -11,4 +11,4 @@ fi
1111

1212
export SRM_PATH
1313

14-
/usr/sbin/srm -bringOnline $*
14+
"${SRM_PATH}/lib/srm" -bringOnline $*
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22

33
if [ -z "$SRM_PATH" ]; then
4-
SRM_PATH="/usr/share/srm"
4+
SRM_PATH="$(cd $(dirname $0)/../share/srm;pwd)"
55
fi
66

77
if [ ! -d "$SRM_PATH" ]; then
@@ -11,4 +11,4 @@ fi
1111

1212
export SRM_PATH
1313

14-
/usr/sbin/srm -checkPermissions $*
14+
"${SRM_PATH}/lib/srm" -checkPermissions $*
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22

33
if [ -z "$SRM_PATH" ]; then
4-
SRM_PATH="/usr/share/srm"
4+
SRM_PATH="$(cd $(dirname $0)/../share/srm;pwd)"
55
fi
66

77
if [ ! -d "$SRM_PATH" ]; then
@@ -11,4 +11,4 @@ fi
1111

1212
export SRM_PATH
1313

14-
/usr/sbin/srm -extendFileLifetime $*
14+
"${SRM_PATH}/lib/srm" -extendFileLifetime $*
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22

33
if [ -z "$SRM_PATH" ]; then
4-
SRM_PATH="/usr/share/srm"
4+
SRM_PATH="$(cd $(dirname $0)/../share/srm;pwd)"
55
fi
66

77
if [ ! -d "$SRM_PATH" ]; then
@@ -11,4 +11,4 @@ fi
1111

1212
export SRM_PATH
1313

14-
/usr/sbin/srm -getFileMetaData $*
14+
"${SRM_PATH}/lib/srm" -getFileMetaData $*
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22

33
if [ -z "$SRM_PATH" ]; then
4-
SRM_PATH="/usr/share/srm"
4+
SRM_PATH="$(cd $(dirname $0)/../share/srm;pwd)"
55
fi
66

77
if [ ! -d "$SRM_PATH" ]; then
@@ -11,4 +11,4 @@ fi
1111

1212
export SRM_PATH
1313

14-
/usr/sbin/srm -getPermissions $*
14+
"${SRM_PATH}/lib/srm" -getPermissions $*

0 commit comments

Comments
 (0)