fix in_screen so that it works on os that don't chdir to $PWD
authorMatthieu Patou <mat@matws.net>
Mon, 1 Nov 2010 13:55:25 +0000 (00:55 +1100)
committerStefan Metzmacher <metze@samba.org>
Fri, 5 Nov 2010 09:27:19 +0000 (09:27 +0000)
That's the case on freebsd 7.2

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Nov  5 09:27:19 UTC 2010 on sn-devel-104

selftest/in_screen

index 927d83109bde5447269c33a03b43c673991e9689..8bfbc0101b0c783020a5b213304bc4a76dbe52bd 100755 (executable)
@@ -39,6 +39,7 @@ printenv |
   sed "s/\(^[^=]*=\)\(.*\)/export \1'\2'/g" > $basedir/$SERVERNAME.vars
 
 cat <<EOF > $basedir/$SERVERNAME.launch
   sed "s/\(^[^=]*=\)\(.*\)/export \1'\2'/g" > $basedir/$SERVERNAME.vars
 
 cat <<EOF > $basedir/$SERVERNAME.launch
+cd $PWD
  echo \$\$ > $basedir/$SERVERNAME.pid
  . $basedir/$SERVERNAME.vars
  echo "\$(date) starting $SERVERNAME" >> $basedir/$SERVERNAME.log
  echo \$\$ > $basedir/$SERVERNAME.pid
  . $basedir/$SERVERNAME.vars
  echo "\$(date) starting $SERVERNAME" >> $basedir/$SERVERNAME.log