From 17220eba8f749b87dd26f80453eb456cec18634e Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Fri, 18 Aug 2006 14:35:52 +0000 Subject: [PATCH] puts root-user's homedir (/root) under /data --- build.sh | 14 +++++++++++++- build_devel.sh | 14 ++++++++++++-- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/build.sh b/build.sh index 2a1f6df..0bbea3d 100755 --- a/build.sh +++ b/build.sh @@ -10,11 +10,12 @@ # root/ (mount point) # data/ (various data files) # data/etc/planetlab/ (configuration files) +# data/root (root's homedir) # # Mark Huang # Copyright (C) 2006 The Trustees of Princeton University # -# $Id$ +# $Id: build.sh,v 1.32 2006/08/16 21:44:48 mlhuang Exp $ # . build.functions @@ -126,9 +127,20 @@ echo "* myplc: Installing configuration file" install -D -m 444 $config data/etc/planetlab/default_config.xml install -D -m 444 plc_config.dtd data/etc/planetlab/plc_config.dtd +# handle root's homedir and tweak root prompt +echo "* myplc: root's homedir and prompt" +roothome=data/root +mkdir -p $roothome +cat << EOF > $roothome/.profile +export PS1=" \$PS1" +EOF +chmod 644 $roothome/.profile + # Move "data" directories out of the installation +echo "* myplc: Moving data directories out of the installation" datadirs=( /etc/planetlab +/root /var/lib/pgsql /var/www/html/alpina-logs /var/www/html/boot diff --git a/build_devel.sh b/build_devel.sh index 5ad3e03..5b23db6 100755 --- a/build_devel.sh +++ b/build_devel.sh @@ -10,11 +10,12 @@ # devel/data/cvs/ (local CVS repository) # devel/data/build/ (build area) # devel/data/etc/planetlab/ (configuration) +# devel/data/root (root's home dir) # # Mark Huang # Copyright (C) 2006 The Trustees of Princeton University # -# $Id: build_devel.sh,v 1.3 2006/08/09 21:38:06 mlhuang Exp $ +# $Id: build_devel.sh,v 1.4 2006/08/11 18:34:59 thierry Exp $ # . build.functions @@ -64,10 +65,19 @@ find plc.d/functions | cpio -p -d -u devel/root/etc/ install -D -m 755 guest.init devel/root/etc/init.d/plc chroot devel/root sh -c 'chkconfig --add plc; chkconfig plc on' +# handle root's homedir and tweak root prompt +echo "* myplc-devel: root's homedir and prompt" +roothome=devel/data/root +mkdir -p $roothome +cat << EOF > $roothome/.profile +export PS1=" \$PS1" +EOF +chmod 644 $roothome/.profile + # Move "data" directories out of the installation echo "* myplc-devel: Moving data directories out of the installation" move_datadirs devel/root devel/data \ - /etc/planetlab /build /cvs + /etc/planetlab /build /cvs /root # Make image out of directory echo "* myplc-devel: Building loopback image" -- 2.43.0