ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question
0 uses rm without -f: errors on login/new shell

asked 2013-01-30 20:42:46 -0600

Martin.W gravatar image


I have defined: alias rm='rm -i' to prevent myself from desasters.

Unfortunately ROS uses rm in a way, that I get asked to remove the file /tmp/ while logging in or starting a new bash (both source

Well, here is a patch, that adds a check and some quotes, too:

$ diff /opt/ros/groovy/ /opt/ros/groovy/
< MKTEMP=`which mktemp`
> MKTEMP="`which mktemp`"
> SETUP_TMP="`$MKTEMP /tmp/`"
> if [ $? -ne 0 ] ;  then
>   echo "ROS config error: creating tmp file for setup failed" >> "/dev/stderr"
> else
>  . "$SETUP_TMP"
>  rm -f "$SETUP_TMP"
> fi

might be worth a patch, but unfortunately I was not able to create an account on the bugtracker.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2013-01-31 07:29:05 -0600

Martin.W gravatar image

Ticket created:

edit flag offensive delete link more

answered 2013-01-30 22:31:31 -0600

dornhege gravatar image

rm -f would override everyone's rm -i alias if they want it or not.

Maybe it would be better to do something like:

if [ -z $RM ]; then
    RM=$(which rm)
use $RM
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2013-01-30 20:42:46 -0600

Seen: 421 times

Last updated: Jan 31 '13