Bug#390506: Patch for init script
severity 390506 important thanks Hi! You wrote: If $SCREENDIR has just been created, I don't see any reason to search it for stale screen sessions : --- /etc/init.d/screen-cleanup 2004-03-16 03:29:04.0 +0100 +++ /tmp/screen-cleanup 2007-01-20 15:41:58.0 +0100 snip Adam, any chance you could fix this soon? It's a pretty annoying issue with a trivial fix... -- Kind regards, ++ | Bas Zoetekouw | GPG key: 0644fab7 | || Fingerprint: c1f5 f24c d514 3fec 8bf6 | | [EMAIL PROTECTED] | a2b1 2bae e41f 0644 fab7 | ++ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#390506: Patch for init script
Package: screen Version: 4.0.3-0.2 Followup-For: Bug #390506 If $SCREENDIR has just been created, I don't see any reason to search it for stale screen sessions : --- /etc/init.d/screen-cleanup 2004-03-16 03:29:04.0 +0100 +++ /tmp/screen-cleanup 2007-01-20 15:41:58.0 +0100 @@ -9,7 +9,12 @@ case $1 in start) -if find $SCREENDIR -type p | grep '^' /dev/null; then +if [ ! -d $SCREENDIR ]; then +echo -n Creating $SCREENDIR... +mkdir -m 0775 $SCREENDIR +chown root:utmp $SCREENDIR +echo done. +elif find $SCREENDIR -type p | grep '^' /dev/null; then echo -n 'Cleaning up stale screen sessions... ' find $SCREENDIR -type p -print0 | xargs -0 rm -f echo done. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#390506: Patch for init script
Hello! On Wed, 06 Dec 2006 20:24:04 +0100, Rasmus Bøg Hansen wrote: The attached patch fixes this bug (which I've been bitten by too): I already posted a similar patch to bug #397088 [1], please let me comment yours. +if [ ! -d $SCREENDIR ]; then +mkdir $SCREENDIR + chown root:utmp $SCREENDIR + chmod 775 $SCREENDIR As in my previous patch, why not directly create the directory with proper permissions and be a bit more verbose? Thus: = --- /etc/init.d/screen-cleanup 2004-11-14 19:26:30.0 +0100 +++ /home/luca/screen-cleanup 2006-12-12 22:02:08.0 +0100 @@ -9,6 +9,12 @@ case $1 in start) +if [ ! -d $SCREENDIR ]; then +echo -n Creating $SCREENDIR... +mkdir -m 0775 $SCREENDIR +chown root:utmp $SCREENDIR +echo done. +fi if find $SCREENDIR -type p | grep '^' /dev/null; then echo -n 'Cleaning up stale screen sessions... ' find $SCREENDIR -type p -print0 | xargs -0 rm -f = Thx, bye, Gismo / Luca Footnotes: [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=397088 pgpu1qriVwljK.pgp Description: PGP signature
Bug#390506: Patch for init script
Luca Capello [EMAIL PROTECTED] hit the keyboard. Afterwards the following was on the screen: On Wed, 06 Dec 2006 20:24:04 +0100, Rasmus Bøg Hansen wrote: The attached patch fixes this bug (which I've been bitten by too): I already posted a similar patch to bug #397088 [1], please let me comment yours. I thought I'd looked well though all bug reports, but I missed that one :-) +if [ ! -d $SCREENDIR ]; then +mkdir $SCREENDIR +chown root:utmp $SCREENDIR +chmod 775 $SCREENDIR As in my previous patch, why not directly create the directory with proper permissions and be a bit more verbose? Thus: = --- /etc/init.d/screen-cleanup2004-11-14 19:26:30.0 +0100 +++ /home/luca/screen-cleanup 2006-12-12 22:02:08.0 +0100 @@ -9,6 +9,12 @@ case $1 in start) +if [ ! -d $SCREENDIR ]; then +echo -n Creating $SCREENDIR... +mkdir -m 0775 $SCREENDIR +chown root:utmp $SCREENDIR +echo done. +fi if find $SCREENDIR -type p | grep '^' /dev/null; then echo -n 'Cleaning up stale screen sessions... ' find $SCREENDIR -type p -print0 | xargs -0 rm -f = That seems good to me. I'd go for your version. Regards /Rasmus -- -- [ Rasmus Møffe Bøg Hansen ] --- Microsoft spel chekar worgs grate! --[ moffe at zz9 dot dk ] --
Bug#390506: Patch for init script
Package: screen tags 390506 patch thanks The attached patch fixes this bug (which I've been bitten by too): diff -urN screen-4.0.3.orig/debian/init screen-4.0.3/debian/init --- screen-4.0.3.orig/debian/init 2006-12-06 20:12:47.0 +0100 +++ screen-4.0.3/debian/init 2006-12-06 20:16:42.0 +0100 @@ -9,6 +9,11 @@ case $1 in start) +if [ ! -d $SCREENDIR ]; then +mkdir $SCREENDIR + chown root:utmp $SCREENDIR + chmod 775 $SCREENDIR +fi if find $SCREENDIR -type p | grep '^' /dev/null; then echo -n 'Cleaning up stale screen sessions... ' find $SCREENDIR -type p -print0 | xargs -0 rm -f Regards /Rasmus -- -- [ Rasmus Møffe Bøg Hansen ] --- If you try to prove Murphy's law - will you fail? --[ moffe at zz9 dot dk ] --