summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorR. Dale Thomas <rdt@rdt1.org>2008-10-16 08:12:19 (GMT)
committerR. Dale Thomas <rdt@rdt1.org>2008-10-16 08:12:19 (GMT)
commit86200220d0f67d160e62e99c4079f2197426c4b9 (patch)
tree3875b0f0e2efc0895a723e77fc730c1ef6159917 /templates
parentef7e29326b258de2dbe14d95b7029d3d9c9c2740 (diff)
downloadlinhes_dev-86200220d0f67d160e62e99c4079f2197426c4b9.zip
Make sure the printout lines up as desired.
Diffstat (limited to 'templates')
-rwxr-xr-xtemplates/enter_dev_chroot.sh12
1 files changed, 8 insertions, 4 deletions
diff --git a/templates/enter_dev_chroot.sh b/templates/enter_dev_chroot.sh
index 1e3160c..a2a6d85 100755
--- a/templates/enter_dev_chroot.sh
+++ b/templates/enter_dev_chroot.sh
@@ -30,6 +30,12 @@ Modify() { # $1 is + for up and - for down.
) 200>$LOCKFILE
}
#-----------------------------------------------------------------------#
+# set the title bar for an xterm or Konsole.
+title() { # args are the title
+ echo -en "\e]0;$@\a" # for xterm,
+ echo -en "\e]30;$@\a" # for Konsole.
+}
+#-----------------------------------------------------------------------#
# check if a filesystem/directory is already mounted & if not, mount it.
# ckMount -t <fstype> <mntDir>
# ckMount --bind <srcDir> <dstDir>
@@ -47,8 +53,7 @@ ckMount() { # $1= -t|--bind, $2= fstype|srcDir $3= mntDir|dstDir
# if this is the last incident, unmount all.
cleanUp() { # no arguments
# mark the exit to normal operation:
- echo -en "\e]0;Normal\a" # for xterm,
- echo -en "\e]30;Normal\a" # for Konsole.
+ title Normal
V=$(Modify -)
[ "$V" -ne "0" ] && exit 0
@@ -131,8 +136,7 @@ ckMount --bind $repoBaseDir data/$repoBaseDir
copyIn
# change the titlebar to indicate chroot:
-echo -e "\e]0;CHROOT : $ARCH\a" # for xterm,
-echo -e "\e]30;CHROOT : $ARCH\a" # for Konsole.
+title "CHROOT : $ARCH"
# The actual chroot:
env -i TERM="$TERM" DISPLAY="$DISPLAY" /usr/sbin/chroot . /bin/bash --login