.bashrc interactive shell check not working in case of interactive shell invoked by sudo -i

Bug #578196 reported by Andreas Scheerer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
bash (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: bash

In .bashrc the following command does not work properly when running a interactive shell by sudo -i :

# If not running interactively, don't do anything
[ -z "$PS1" ] && return

So either "sudo -i" should set $PS1 should set $PS1 properly or .bashrc should use a different mehtod to determine the shell type.

ProblemType: Bug
Architecture: i386
DistroRelease: Ubuntu 9.04
Package: bash 3.2-5ubuntu1
ProcEnviron:
 PATH=(custom, user)
 LANG=de_DE.UTF-8
 SHELL=/bin/bash
SourcePackage: bash
Uname: Linux 2.6.28-18-generic i686

Revision history for this message
Andreas Scheerer (andreas-scheerer) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.