aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xiurt28
1 files changed, 6 insertions, 2 deletions
diff --git a/iurt2 b/iurt2
index 8fccfd7..75443d4 100755
--- a/iurt2
+++ b/iurt2
@@ -418,6 +418,10 @@ my %config_usage = (
desc => 'Name of the build bot',
default => 'Iurt'
},
+ prompt => {
+ desc => 'Default prompt in the chroot',
+ default => qq{PS1='[\\033[00;33m\\]iurt $run{distro}\\[\\033[00m\\]] \\[\\033[00;31m\\]\\u\\[\\033[00;32m\\]\\h\\[\\033[00m\\]\\w\$ '},
+ },
repository => {
desc => 'Prefix of the repositories',
default => ''
@@ -653,7 +657,7 @@ if ($run{shell}) {
add_sudoers(\%run, $chroot_tmp, $luser);
if ($run{shell}) {
plog('NOTIFY', "dumping to a chrooted shell into $chroot_tmp");
- exec $sudo, 'chroot', $chroot_tmp, '/bin/su', $luser, '-c', "PS1='[\[\033[01;33m\]iurt $run{distro} \[\033[00m\]\u@\h \W]\$ ' bash";
+ exec $sudo, 'chroot', $chroot_tmp, '/bin/su', $luser, '-c', "$config->{prompt} bash";
die "FATAL $program_name: could not exec chroot to $chroot_tmp ($!)";
}
}
@@ -824,7 +828,7 @@ retry:
if ($run{stop}) {
plog("dumping to a chrooted shell into $chroot_tmp (pid $$)");
# exec does not work because it seems stdin and out are shared between children
- system($sudo, 'chroot', $chroot_tmp, '/bin/su', $luser, '-c', "PS1='[\[\033[01;33m\]iurt $run{distro} \[\033[00m\]\u@\h \W]\$ ' bash");
+ system($sudo, 'chroot', $chroot_tmp, '/bin/su', $luser, '-c', "$config->{prompt} bash");
exit();
}
plog('DEBUG', "calling callback for $opt->{hash}");