From 31ecc851914cf6af35426a0315bedc709bb15c99 Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Wed, 10 Mar 2010 18:23:16 -0600 Subject: [PATCH] debian/postinst: handle situation where /var/run/screen does not exist, LP: #535648 --- debian/changelog | 4 ++++ debian/postinst | 15 +++++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/debian/changelog b/debian/changelog index 40341432..a9accdad 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,6 @@ byobu (2.63) unreleased; urgency=low + [ Dustin Kirkland ] * etc/byobu/socketdir, usr/bin/byobu-config, usr/bin/byobu-janitor, usr/bin/byobu-select-profile: increase portability to other distros, create socketdir conffile and SOCKETDIR variable for users who don't @@ -7,6 +8,9 @@ byobu (2.63) unreleased; urgency=low * usr/bin/byobu-config: change a sample reference from "bash" to "shell" again for portability, LP: #535407 + [ Torsten Spindler ] + * debian/postinst: handle situation where /var/run/screen does not + exist, LP: #535648 -- Dustin Kirkland Tue, 09 Mar 2010 14:53:10 -0600 diff --git a/debian/postinst b/debian/postinst index ac20d1dd..1cba2486 100644 --- a/debian/postinst +++ b/debian/postinst @@ -18,11 +18,14 @@ fi # Notify users that they should reload their profile DIR="/var/run/screen" -for d in $(ls "$DIR"); do - touch "$DIR/$d/$PKG.reload-required" - u=$(echo "$d" | sed "s:^S-::") - chown $u "$DIR/$d/$PKG.reload-required" - chmod 700 "$DIR/$d/$PKG.reload-required" -done +if [ -d "$DIR" ]; then + for d in "$DIR"/*; do + [ -d "$DIR/$d" ] || continue + touch "$DIR/$d/$PKG.reload-required" + u=$(echo "$d" | sed "s:^S-::") + chown $u "$DIR/$d/$PKG.reload-required" + chmod 700 "$DIR/$d/$PKG.reload-required" + done +fi #DEBHELPER#