diff --git a/debian/changelog b/debian/changelog index cd5740bf..b03afb3c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,8 +2,9 @@ screen-profiles (1.53) unreleased; urgency=low * screen: some users gripe about the default launched window being called "motd+shell", LP: #369397 + * motd+shell, screen: clean up temp file - -- Dustin Kirkland Wed, 29 Apr 2009 15:59:51 -0500 + -- Dustin Kirkland Wed, 29 Apr 2009 16:11:29 -0500 screen-profiles (1.52-0ubuntu1) karmic; urgency=low diff --git a/motd+shell b/motd+shell index abdfccab..d880111e 100755 --- a/motd+shell +++ b/motd+shell @@ -18,4 +18,5 @@ # along with this program. If not, see . [ -r /etc/motd ] && cat /etc/motd +[ -n "$1" -a -w "$1" ] && rm -f "$1" 2>/dev/null [ -n "$SHELL" -a -x "$SHELL" ] && exec "$SHELL" || exec /bin/sh diff --git a/screen b/screen index 4ef2a68f..082ce105 100755 --- a/screen +++ b/screen @@ -81,11 +81,10 @@ fi if [ "$#" = "0" ]; then # Create a temporary config file *with* the default windows # but if we refresh, we'll just source the profile, without - temp=$(mktemp screen-profiles-XXXXXXXX) - trap "rm -f $temp 2>/dev/null || true" EXIT HUP INT QUIT TERM + temp=$(mktemp -t screen-profiles-XXXXXXXX) cat "$HOME/.screen-profiles/profile" "$HOME/.screen-profiles/windows" > "$temp" [ -n "$SHELL" -a -x "$SHELL" ] || SHELL="/bin/sh" - exec /usr/bin/screen.real -c "$temp" $SHELL /usr/bin/motd+shell + exec /usr/bin/screen.real -c "$temp" $SHELL /usr/bin/motd+shell "$temp" else exec /usr/bin/screen.real -c "$HOME/.screen-profiles/profile" "$@" fi