summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKang Kai <kai.kang@windriver.com>2012-12-18 17:03:23 +0800
committerSaul Wold <sgw@linux.intel.com>2012-12-25 14:00:21 -0800
commit341da5b6e46e0884d60e9462d1306d525fa99b94 (patch)
treefd3008a491205aa1097d6158eb801ab5297c0dda
parenta78cd0b3a69b829327cea035321051ab11cba70f (diff)
downloadopenembedded-core-341da5b6e46e0884d60e9462d1306d525fa99b94.tar.gz
openembedded-core-341da5b6e46e0884d60e9462d1306d525fa99b94.tar.bz2
openembedded-core-341da5b6e46e0884d60e9462d1306d525fa99b94.zip
base-files: use dynamic root home directory
Use var ROOT_HOME to configure root home directory dynamically. Signed-off-by: Kang Kai <kai.kang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
-rw-r--r--meta/recipes-core/base-files/base-files/profile2
-rw-r--r--meta/recipes-core/base-files/base-files_3.0.14.bb3
2 files changed, 3 insertions, 2 deletions
diff --git a/meta/recipes-core/base-files/base-files/profile b/meta/recipes-core/base-files/base-files/profile
index e9408d17d7..8eeaac3693 100644
--- a/meta/recipes-core/base-files/base-files/profile
+++ b/meta/recipes-core/base-files/base-files/profile
@@ -11,7 +11,7 @@ if [ ! -e /etc/localtime ]; then
export TZ
fi
-if [ "$HOME" = "/home/root" ]; then
+if [ "$HOME" = "ROOTHOME" ]; then
PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin
fi
if [ "$PS1" ]; then
diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb
index ba355ee07c..39faad96e5 100644
--- a/meta/recipes-core/base-files/base-files_3.0.14.bb
+++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
@@ -34,7 +34,7 @@ docdir_append = "/${P}"
dirs1777 = "/tmp ${localstatedir}/volatile/lock ${localstatedir}/volatile/tmp"
dirs2775 = "/home ${prefix}/src ${localstatedir}/local"
dirs755 = "/bin /boot /dev ${sysconfdir} ${sysconfdir}/default \
- ${sysconfdir}/skel /lib /mnt /proc /home/root /sbin \
+ ${sysconfdir}/skel /lib /mnt /proc ${ROOT_HOME} /sbin \
${prefix} ${bindir} ${docdir} /usr/games ${includedir} \
${libdir} ${sbindir} ${datadir} \
${datadir}/common-licenses ${datadir}/dict ${infodir} \
@@ -94,6 +94,7 @@ do_install () {
install -m 0644 ${WORKDIR}/fstab ${D}${sysconfdir}/fstab
install -m 0644 ${WORKDIR}/filesystems ${D}${sysconfdir}/filesystems
install -m 0644 ${WORKDIR}/usbd ${D}${sysconfdir}/default/usbd
+ sed -i "s#ROOTHOME#${ROOT_HOME}#" ${WORKDIR}/profile
install -m 0644 ${WORKDIR}/profile ${D}${sysconfdir}/profile
install -m 0644 ${WORKDIR}/shells ${D}${sysconfdir}/shells
install -m 0755 ${WORKDIR}/share/dot.profile ${D}${sysconfdir}/skel/.profile