Skip to content

Commit

Permalink
Merge pull request #1371 from ellert/var-run-is-run
Browse files Browse the repository at this point in the history
Use /run instead of /var/run
  • Loading branch information
simonmichal committed Jan 4, 2021
2 parents bf33edc + 985bd09 commit 7bcc148
Show file tree
Hide file tree
Showing 13 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion packaging/common/cmsd@.service
Expand Up @@ -6,7 +6,7 @@ Requires=network-online.target
After=network-online.target

[Service]
ExecStart=/usr/bin/cmsd -l /var/log/xrootd/cmsd.log -c /etc/xrootd/xrootd-%i.cfg -k fifo -s /var/run/xrootd/cmsd-%i.pid -n %i
ExecStart=/usr/bin/cmsd -l /var/log/xrootd/cmsd.log -c /etc/xrootd/xrootd-%i.cfg -k fifo -s /run/xrootd/cmsd-%i.pid -n %i
User=xrootd
Group=xrootd
Type=simple
Expand Down
2 changes: 1 addition & 1 deletion packaging/common/frm_purged@.service
Expand Up @@ -6,7 +6,7 @@ Requires=network-online.target
After=network-online.target

[Service]
ExecStart=/usr/bin/frm_purged -l /var/log/xrootd/frm_purged.log -c /etc/xrootd/xrootd-%i.cfg -k fifo -s /var/run/xrootd/frm_purged-%i.pid -n %i
ExecStart=/usr/bin/frm_purged -l /var/log/xrootd/frm_purged.log -c /etc/xrootd/xrootd-%i.cfg -k fifo -s /run/xrootd/frm_purged-%i.pid -n %i
User=xrootd
Group=xrootd
Type=simple
Expand Down
2 changes: 1 addition & 1 deletion packaging/common/frm_xfrd@.service
Expand Up @@ -6,7 +6,7 @@ Requires=network-online.target
After=network-online.target

[Service]
ExecStart=/usr/bin/frm_xfrd -l /var/log/xrootd/frm_xfrd.log -c /etc/xrootd/xrootd-%i.cfg -k fifo -s /var/run/xrootd/frm_xfrd-%i.pid -n %i
ExecStart=/usr/bin/frm_xfrd -l /var/log/xrootd/frm_xfrd.log -c /etc/xrootd/xrootd-%i.cfg -k fifo -s /run/xrootd/frm_xfrd-%i.pid -n %i
User=xrootd
Group=xrootd
Type=simple
Expand Down
2 changes: 1 addition & 1 deletion packaging/common/xrootd-clustered.cfg
Expand Up @@ -50,7 +50,7 @@ frm.xfr.copycmd /bin/cp /dev/null $PFN
# IPC files should be placed
#
all.adminpath /var/spool/xrootd
all.pidpath /var/run/xrootd
all.pidpath /run/xrootd

# More configuration files can be added in /etc/xrootd/config.d/
# For example /etc/xrootd/config.d/10-mygrid.cfg and
Expand Down
2 changes: 1 addition & 1 deletion packaging/common/xrootd-http.cfg
Expand Up @@ -22,7 +22,7 @@ all.export /tmp
# IPC files should be placed
#
all.adminpath /var/spool/xrootd
all.pidpath /var/run/xrootd
all.pidpath /run/xrootd

# Load the http protocol, indicate that it should be served on port 80.
# The socket bound to port 80 has to be preallocated by the systemd
Expand Down
2 changes: 1 addition & 1 deletion packaging/common/xrootd-standalone.cfg
Expand Up @@ -22,7 +22,7 @@
# IPC files should be placed
#
all.adminpath /var/spool/xrootd
all.pidpath /var/run/xrootd
all.pidpath /run/xrootd

# More configuration files can be added in /etc/xrootd/config.d/
# For example /etc/xrootd/config.d/10-mygrid.cfg and
Expand Down
2 changes: 1 addition & 1 deletion packaging/common/xrootd@.service
Expand Up @@ -6,7 +6,7 @@ Requires=network-online.target
After=network-online.target

[Service]
ExecStart=/usr/bin/xrootd -l /var/log/xrootd/xrootd.log -c /etc/xrootd/xrootd-%i.cfg -k fifo -s /var/run/xrootd/xrootd-%i.pid -n %i
ExecStart=/usr/bin/xrootd -l /var/log/xrootd/xrootd.log -c /etc/xrootd/xrootd-%i.cfg -k fifo -s /run/xrootd/xrootd-%i.pid -n %i
User=xrootd
Group=xrootd
Type=simple
Expand Down
16 changes: 8 additions & 8 deletions packaging/rhel/xrootd.functions
Expand Up @@ -92,11 +92,11 @@ function checkSanity()
chown $XROOTD_USER:$XROOTD_GROUP -R /var/spool/xrootd
fi

mkdir -p /var/run/xrootd
chown $XROOTD_USER:$XROOTD_GROUP -R /var/run/xrootd
checkDirectory /var/run/xrootd $XROOTD_USER $XROOTD_GROUP
mkdir -p /run/xrootd
chown $XROOTD_USER:$XROOTD_GROUP -R /run/xrootd
checkDirectory /run/xrootd $XROOTD_USER $XROOTD_GROUP
if test $? -ne 0; then
chown $XROOTD_USER:$XROOTD_GROUP -R /var/run/xrootd
chown $XROOTD_USER:$XROOTD_GROUP -R /run/xrootd
fi
}

Expand All @@ -112,7 +112,7 @@ function startDaemon()
XROOTD_USER=$3
XROOTD_GROUP=$4
INSTANCE=$5
PIDFILE="/var/run/xrootd/$DAEMON-$INSTANCE.pid"
PIDFILE="/run/xrootd/$DAEMON-$INSTANCE.pid"

# check sanity of the installation
checkSanity $XROOTD_USER $XROOTD_GROUP
Expand All @@ -138,7 +138,7 @@ function startDaemon()
function stopDaemon()
{
echo -n "Shutting down xrootd ($1, $5): "
PIDFILE="/var/run/xrootd/$1-$5.pid"
PIDFILE="/run/xrootd/$1-$5.pid"
if [ -e $PIDFILE ]; then
killproc -p $PIDFILE $1
RETVAL=$?
Expand All @@ -155,7 +155,7 @@ function stopDaemon()
#-------------------------------------------------------------------------------
function statusOfTheDaemon()
{
PIDFILE="/var/run/xrootd/$1-$5.pid"
PIDFILE="/run/xrootd/$1-$5.pid"
echo -n "[$5] "
status -p $PIDFILE $1
return $RETVAL
Expand All @@ -166,7 +166,7 @@ function statusOfTheDaemon()
#-------------------------------------------------------------------------------
function condrestartDaemon()
{
PIDFILE="/var/run/xrootd/$1-$5.pid"
PIDFILE="/run/xrootd/$1-$5.pid"
status -p $PIDFILE $1 > /dev/null
if test $? -ne 0; then
return 0
Expand Down
14 changes: 7 additions & 7 deletions packaging/rhel/xrootd.functions-slc4
Expand Up @@ -92,11 +92,11 @@ function checkSanity()
chown $XROOTD_USER:$XROOTD_GROUP -R /var/spool/xrootd
fi

mkdir -p /var/run/xrootd
chown $XROOTD_USER:$XROOTD_GROUP -R /var/run/xrootd
checkDirectory /var/run/xrootd $XROOTD_USER $XROOTD_GROUP
mkdir -p /run/xrootd
chown $XROOTD_USER:$XROOTD_GROUP -R /run/xrootd
checkDirectory /run/xrootd $XROOTD_USER $XROOTD_GROUP
if test $? -ne 0; then
chown $XROOTD_USER:$XROOTD_GROUP -R /var/run/xrootd
chown $XROOTD_USER:$XROOTD_GROUP -R /run/xrootd
fi
}

Expand All @@ -111,7 +111,7 @@ function startDaemon()
XROOTD_USER=$3
XROOTD_GROUP=$4
INSTANCE=$5
PIDFILE="/var/run/xrootd/$DAEMON-$INSTANCE.pid"
PIDFILE="/run/xrootd/$DAEMON-$INSTANCE.pid"

# check sanity of the installation
checkSanity $XROOTD_USER $XROOTD_GROUP
Expand Down Expand Up @@ -140,7 +140,7 @@ function startDaemon()
function stopDaemon()
{
echo -n "Shutting down xrootd ($1, $5): "
PIDFILE="/var/run/xrootd/$1-$5.pid"
PIDFILE="/run/xrootd/$1-$5.pid"

if test -r "$PIDFILE"; then
PID=`cat "$PIDFILE"`
Expand All @@ -164,7 +164,7 @@ function stopDaemon()
#-------------------------------------------------------------------------------
function statusOfTheDaemon()
{
PIDFILE="/var/run/xrootd/$1-$5.pid"
PIDFILE="/run/xrootd/$1-$5.pid"
echo -n "[$5] "

if test -r "$PIDFILE"; then
Expand Down
2 changes: 1 addition & 1 deletion packaging/rhel/xrootd.tmpfiles
@@ -1 +1 @@
d /var/run/xrootd - xrootd xrootd -
d /run/xrootd - xrootd xrootd -
2 changes: 1 addition & 1 deletion src/XrdSciTokens/test/config/xrootd-http.cfg
Expand Up @@ -22,7 +22,7 @@ all.export /tmp
# IPC files should be placed
#
all.adminpath /var/spool/xrootd
all.pidpath /var/run/xrootd
all.pidpath /run/xrootd

# Load the http protocol, indicate that it should be seved on port 80.
# The socket bound to port 80 has to be preallocated by the systemd
Expand Down
4 changes: 2 additions & 2 deletions src/XrdSciTokens/test/test_inside_docker.sh
Expand Up @@ -31,8 +31,8 @@ popd
rpmbuild --define '_topdir /tmp/rpmbuild' -ba /tmp/rpmbuild/SPECS/xrootd-scitokens.spec

# After building the RPM, try to install it
# Fix the lock file error on EL7. /var/lock is a symlink to /var/run/lock
mkdir -p /var/run/lock
# Fix the lock file error on EL7. /var/lock is a symlink to /run/lock
mkdir -p /run/lock

RPM_LOCATION=/tmp/rpmbuild/RPMS/x86_64

Expand Down
4 changes: 2 additions & 2 deletions utils/XrdCmsNotify.pm
Expand Up @@ -167,9 +167,9 @@ sub getConfig {my($iname) = @_;
# Construct possible pid paths
#
if ($iname eq '')
{$pp1 = '/tmp/cmsd.pid'; $pp2 = '/var/run/cmsd/cmsd.pid';}
{$pp1 = '/tmp/cmsd.pid'; $pp2 = '/run/cmsd/cmsd.pid';}
else
{$pp1 = "/tmp/$iname/cmsd.pid"; $pp2 = "/var/run/cmsd/$iname/cmsd.pid";}
{$pp1 = "/tmp/$iname/cmsd.pid"; $pp2 = "/run/cmsd/$iname/cmsd.pid";}

# We will look for the pid file in one of two locations
#
Expand Down

0 comments on commit 7bcc148

Please sign in to comment.