From 09b696ead89523fd4f178afecb4f40b9daaf8949 Mon Sep 17 00:00:00 2001
From: Robert Nelson <robertcnelson@gmail.com>
Date: Wed, 18 Dec 2013 12:26:04 -0600
Subject: [PATCH] card script: easily enable systemd

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
---
 tools/setup_sdcard.sh | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/tools/setup_sdcard.sh b/tools/setup_sdcard.sh
index 8a6d24175..854f17ccc 100755
--- a/tools/setup_sdcard.sh
+++ b/tools/setup_sdcard.sh
@@ -260,11 +260,19 @@ boot_uenv_txt_template () {
 		__EOF__
 	fi
 
-	cat >> ${TEMPDIR}/bootscripts/normal.cmd <<-__EOF__
-		##Enable systemd
-		#systemd=quiet init=/lib/systemd/systemd
+	if [ "x${enable_systemd}" = "xenabled" ] ; then
+		cat >> ${TEMPDIR}/bootscripts/normal.cmd <<-__EOF__
+			##Enable systemd
+			systemd=quiet init=/lib/systemd/systemd
 
-	__EOF__
+		__EOF__
+	else
+		cat >> ${TEMPDIR}/bootscripts/normal.cmd <<-__EOF__
+			##Enable systemd
+			#systemd=quiet init=/lib/systemd/systemd
+
+		__EOF__
+	fi
 
 	case "${SYSTEM}" in
 	bone|bone_dtb)
@@ -1583,6 +1591,8 @@ while [ ! -z "$1" ] ; do
 	--beagleboard.org-production)
 		bborg_production=1
 		;;
+	--enable-systemd)
+		enable_systemd="enabled"
 	--offline)
 		offline=1
 		;;
-- 
GitLab