[lxc-devel] [lxc/master] issue: 1164 fixed broken cron link in alpine image

melato on Github lxc-bot at linuxcontainers.org
Tue Sep 6 13:05:37 UTC 2016


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 687 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20160906/81dd449d/attachment.bin>
-------------- next part --------------
From 716eb5b8a89e73c1facabe87644a8d2dbae753ee Mon Sep 17 00:00:00 2001
From: Alex Athanasopoulos <alex at melato.org>
Date: Tue, 6 Sep 2016 15:29:52 +0300
Subject: [PATCH 1/2] issue 1164:  fixed broken
 /etc/runlevels/default/{cron,crond} link

---
 templates/lxc-alpine.in | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/templates/lxc-alpine.in b/templates/lxc-alpine.in
index 988f109..cd84a7c 100644
--- a/templates/lxc-alpine.in
+++ b/templates/lxc-alpine.in
@@ -364,8 +364,13 @@ setup_services() {
 	done
 
 	# default runlevel
-	for svc_name in networking cron; do
-		ln -s /etc/init.d/$svc_name etc/runlevels/default/$svc_name
+	for svc_name in networking cron crond; do
+		# issue 1164: alpine renamed cron to crond
+		# Use the one that exists.
+		if [ -e etc/init.d/$svc_name ]
+		then
+			ln -s /etc/init.d/$svc_name etc/runlevels/default/$svc_name
+		fi
 	done
 }
 

From 345a05a0449007cd3dbc57ccd982ce7c3fb619d1 Mon Sep 17 00:00:00 2001
From: Alex Athanasopoulos <alex at melato.org>
Date: Tue, 6 Sep 2016 15:36:17 +0300
Subject: [PATCH 2/2] formatting

Signed-off-by: Alex Athanasopoulos <alex at melato.org>
---
 templates/lxc-alpine.in | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/templates/lxc-alpine.in b/templates/lxc-alpine.in
index cd84a7c..a6b3363 100644
--- a/templates/lxc-alpine.in
+++ b/templates/lxc-alpine.in
@@ -367,8 +367,7 @@ setup_services() {
 	for svc_name in networking cron crond; do
 		# issue 1164: alpine renamed cron to crond
 		# Use the one that exists.
-		if [ -e etc/init.d/$svc_name ]
-		then
+		if [ -e etc/init.d/$svc_name ]; then
 			ln -s /etc/init.d/$svc_name etc/runlevels/default/$svc_name
 		fi
 	done


More information about the lxc-devel mailing list