Skip to contentSkip to conversation

tools: Init scripts minor fixes

PATCH In review Ian Jackson 3 participants 6 messages Feb 7, 2019

lore
Share & tools
lore
#0 lore raw

cover tools: Init scripts minor fixes

The Debian Xen maintainers had a review of the init scripts. Debian has its completely own set of scripts. This is something that needs to be tackled in the medium term but not now.

However, we did identify some things which could be remedied upstream right away.

Ian Jackson (3):
tools: init scripts: xencommons: Provides `xen'
tools: init scripts: xencommons: Fixes to Description
tools: init scripts: make XEN_RUN_DIR and XEN_LOCK_DIR mode 700

 tools/hotplug/Linux/init.d/xencommons.in | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#1 lore raw

PATCH 1/3 tools: init scripts: xencommons: Provides `xen'

It is useful to have a single xen' facility (in the LSB Provides namespace). That allows other facilities to specify that they should go after xen' without needing to know the implementation details.

This service name is already Provide'd by the (fairly different) init scripts used in Debian.

---
 tools/hotplug/Linux/init.d/xencommons.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/hotplug/Linux/init.d/xencommons.in +1 -1
index a33058ed44..581b02c27a 100644
@@ -7,7 +7,7 @@
 # chkconfig: 2345 70 10
 # description: Starts and stops xenstored and xenconsoled
 ### BEGIN INIT INFO
-# Provides:          xenstored xenconsoled
+# Provides:          xenstored xenconsoled xen
 # Required-Start:    $syslog $remote_fs
 # Should-Start:
 # Required-Stop:     $syslog $remote_fs
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#2 lore raw

PATCH 2/3 tools: init scripts: xencommons: Fixes to Description

In reply to Ian Jackson

`neeeded' is a typo. And xend is long gone.

No functional change.

---
 tools/hotplug/Linux/init.d/xencommons.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/hotplug/Linux/init.d/xencommons.in +1 -1
index 581b02c27a..aa62e4c92f 100644
@@ -15,7 +15,7 @@
 # Default-Start:     2 3 5
 # Default-Stop:      0 1 6
 # Short-Description: Start/stop xenstored and xenconsoled
-# Description:       Starts and stops the daemons neeeded for xl/xend
+# Description:       Starts and stops the daemons needed for xl
 ### END INIT INFO
 
 BACKEND_MODULES="@LINUX_BACKEND_MODULES@"
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#3 lore raw

PATCH 3/3 tools: init scripts: make XEN_RUN_DIR and XEN_LOCK_DIR mode 700

In reply to Ian Jackson

These directories ought not to be even world-readable. If this script for some reason runs with a lax umask they might be created overly-writeable. Avoid any such bug by setting the mode explicitly.

---
 tools/hotplug/Linux/init.d/xencommons.in | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/hotplug/Linux/init.d/xencommons.in +2 -2
index aa62e4c92f..7fd6903b98 100644
@@ -56,8 +56,8 @@ do_start () {
 
 	for mod in $BACKEND_MODULES ; do modprobe "$mod" &>/dev/null ; done
 
-	mkdir -p ${XEN_RUN_DIR}
-	mkdir -p ${XEN_LOCK_DIR}
+	mkdir -m700 -p ${XEN_RUN_DIR}
+	mkdir -m700 -p ${XEN_LOCK_DIR}
 	mkdir -p ${XEN_LOG_DIR}
 
 	@XEN_SCRIPT_DIR@/launch-xenstore || exit 1
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Acked-by on the v1 series
#4 lore raw
In reply to Ian Jackson
Quoted 11 lines · Ian Jackson

The Debian Xen maintainers had a review of the init scripts. Debian has its completely own set of scripts. This is something that needs to be tackled in the medium term but not now.

However, we did identify some things which could be remedied upstream right away.

Ian Jackson (3):
tools: init scripts: xencommons: Provides `xen'
tools: init scripts: xencommons: Fixes to Description
tools: init scripts: make XEN_RUN_DIR and XEN_LOCK_DIR mode 700

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#5 lore raw
In reply to Ian Jackson
Quoted 7 lines · Ian Jackson

The Debian Xen maintainers had a review of the init scripts. Debian has its completely own set of scripts. This is something that needs to be tackled in the medium term but not now.

However, we did identify some things which could be remedied upstream right away.

Quoted 8 lines

Ian Jackson (3):
tools: init scripts: xencommons: Provides `xen'
tools: init scripts: xencommons: Fixes to Description
tools: init scripts: make XEN_RUN_DIR and XEN_LOCK_DIR mode 700

 tools/hotplug/Linux/init.d/xencommons.in | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

For the series:

Juergen

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel