Skip to content

Commit

Permalink
CP-9798: Don't start a daemon from a udev RUN rule
Browse files Browse the repository at this point in the history
udev on CentOS 7 kills all processes started from a RUN rule after it
finishes so don't start cdrommon from local-device-change because it
is called from a udev rule.

Instead, an instantiated systemd cdrommon service is started from the udev
rule.

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
  • Loading branch information
rosslagerwall committed Mar 27, 2015
1 parent 06d355e commit b7a62e4
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions scripts/local-device-change
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ DEVICE=$1 # foo

/usr/bin/logger "local-device-change DEVICE=$DEVICE ACTION=$ACTION"

CDROMMON="/opt/xensource/libexec/cdrommon"

. /etc/xensource-inventory

function remove_vdi {
Expand All @@ -45,7 +43,6 @@ do
grep -q "^drive name:[ ]*\W${DEVICE}\(\W\|$\)" /proc/sys/dev/cdrom/info
# is this a CD or not
if [ $? -eq 0 ]; then
${CDROMMON} /dev/xapi/cd/${DEVICE}
for SR in `xe sr-list type=udev sm-config:type=cd uuid=${LOCAL_SR} params=uuid --minimal`
do
xe vdi-introduce uuid=`uuidgen` sr-uuid=${SR} type=user location=/dev/xapi/cd/${DEVICE}
Expand Down

0 comments on commit b7a62e4

Please sign in to comment.