]> Zhao Yanbai Git Server - minix.git/commitdiff
releasetools: Add rc.local support when building x86 images.
authorCristiano Giuffrida <giuffrida@cs.vu.nl>
Sat, 28 Jun 2014 16:23:56 +0000 (18:23 +0200)
committerLionel Sambuc <lionel@minix3.org>
Mon, 28 Jul 2014 15:06:11 +0000 (17:06 +0200)
releasetools/x86_hdimage.sh

index 7055a4c9c8fc5e3b1f42e2d801e92094a6b479a1..6b7a436d617b02e63d1b77cec5fda4d5007aa48a 100755 (executable)
@@ -40,6 +40,7 @@ do
 done
 
 : ${IMG=minix_x86.img}
+: ${RC=minix_x86.rc}
 
 #
 # Are we going to build the minix sources?
@@ -120,6 +121,12 @@ echo "creating the file systems"
 #
 cat ${DESTDIR}/METALOG.sanitised | ${CROSS_TOOLS}/nbmtree -N ${DESTDIR}/etc -C -K device > ${IMG_DIR}/input
 
+# add rc (if any)
+if [ -f ${RC} ]; then
+    cp ${RC} ${DESTDIR}/usr/etc/rc.local
+    echo "./usr/etc/rc.local type=file uid=0 gid=0 mode=0644" >> ${IMG_DIR}/input
+fi
+
 # add fstab
 echo "./etc/fstab type=file uid=0 gid=0 mode=0755 size=747 time=1365060731.000000000" >> ${IMG_DIR}/input