Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use /run instead of /var/run #1371

Merged
merged 1 commit into from
Jan 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion packaging/common/cmsd@.service
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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