Patchwork [2/3] image_crontab.oeclass: Now able to handle none-root crontabs

login
register
mail settings
Submitter Kim B√łndergaard
Date Oct. 4, 2013, 5:52 a.m.
Message ID <abfe639a17e7ddb0d40afbdd0a8fdbfcb6daa101.1380865838.git.kibo@prevas.dk>
Download mbox | patch
Permalink /patch/280470/
State Accepted
Delegated to: Esben Haabendal
Headers show

Comments

Kim B√łndergaard - Oct. 4, 2013, 5:52 a.m.
---
 classes/image_crontab.oeclass | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
Esben Haabendal - Oct. 14, 2013, 2:23 p.m.
Merged to master, thanks.

/Esben

Patch

diff --git a/classes/image_crontab.oeclass b/classes/image_crontab.oeclass
index 0a2d65b..32899a5 100644
--- a/classes/image_crontab.oeclass
+++ b/classes/image_crontab.oeclass
@@ -5,8 +5,9 @@  IMAGE_PREPROCESS_FUNCS:>USE_crontab = " image_preprocess_crontab"
 image_preprocess_crontab () {
 	cwd=`pwd`
 	test -d $cwd/${crontabdir} || return 0
-	for f in $cwd/${crontabdir}/root.* ; do
-		cat $f >> $cwd${crontabdir}/root
+	for f in $cwd/${crontabdir}/*.* ; do
+		user=`basename $f | cut -d. -f1`
+		cat $f >> $cwd${crontabdir}/$user
 		rm $f
 	done
 }