summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSunmin Lee <sunm.lee@samsung.com>2016-11-09 14:39:52 +0900
committerSunmin Lee <sunm.lee@samsung.com>2016-11-11 12:58:37 +0900
commit791ae807fbebce2779eb62465ff2df5bb8c31b60 (patch)
tree56636d0d52916f7a2ae162c6f1d3defe820d9d80
parent453a3eab255cd20e3ae38de432c47fd625545ae4 (diff)
downloadsystem-plugin-791ae807fbebce2779eb62465ff2df5bb8c31b60.tar.gz
system-plugin-791ae807fbebce2779eb62465ff2df5bb8c31b60.tar.bz2
system-plugin-791ae807fbebce2779eb62465ff2df5bb8c31b60.zip
spreadtrum: fixed multi-user script is added
The fixed multi-user feature is introduced into spreadtrum target. It will execute all scripts in the fixed_multiuser scripts directory. Change-Id: Iaca23f98167b7a005447eeb7bd66e468d951a5ec Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
-rw-r--r--packaging/system-plugin.spec4
-rw-r--r--scripts/fixed-multi-user.sh19
2 files changed, 23 insertions, 0 deletions
diff --git a/packaging/system-plugin.spec b/packaging/system-plugin.spec
index 885fbea..1bfacec 100644
--- a/packaging/system-plugin.spec
+++ b/packaging/system-plugin.spec
@@ -185,6 +185,9 @@ install -m 644 units/offline-update.service %{buildroot}%{_unitdir}
ln -s ../offline-update.service %{buildroot}%{_unitdir}/system-update.target.wants/offline-update.service
ln -s %{_datadir}/upgrade %{buildroot}/system-update
+# fixed-multi-user
+install -m 775 -D scripts/fixed-multi-user.sh %{buildroot}%{_datadir}/fixed_multiuser/fixed-multi-user.sh
+
%clean
rm -rf %{buildroot}
@@ -267,6 +270,7 @@ mv %{_sysconfdir}/fstab_lazymnt %{_sysconfdir}/fstab
%{_unitdir}/tizen-fstrim-user.timer
%{_unitdir}/tizen-fstrim-user.service
%{_bindir}/tizen-fstrim-on-charge.sh
+%{_datadir}/fixed_multiuser/fixed-multi-user.sh
%files -n liblazymount
%defattr(-,root,root,-)
diff --git a/scripts/fixed-multi-user.sh b/scripts/fixed-multi-user.sh
new file mode 100644
index 0000000..bfdae4b
--- /dev/null
+++ b/scripts/fixed-multi-user.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+#
+# Fixed Multi-User: executes fixed multiuser scripts
+#
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+
+SCRIPT_DIR=/usr/share/fixed_multiuser/scripts
+
+if [ ! -d ${SCRIPT_DIR} ]
+then
+ exit 0
+fi
+
+SCRIPTS=`/bin/ls ${SCRIPT_DIR}`
+
+for SCRIPT in ${SCRIPTS}; do
+ echo "Run ${SCRIPT}..."
+ /bin/sh ${SCRIPT_DIR}/${SCRIPT}
+done