Bugzilla – Attachment 596 Details for
Bug 5411
Do proper checks for unset variables in scripts
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
use ${VAR+x} when checking variables (by Daniel Eischen)
tl-libexec.diffs (text/plain), 2.97 KB, created by
Samuel Mannehed
on 2015-01-29 10:37:26 CET
(
hide
)
Description:
use ${VAR+x} when checking variables (by Daniel Eischen)
Filename:
MIME Type:
Creator:
Samuel Mannehed
Created:
2015-01-29 10:37:26 CET
Size:
2.97 KB
patch
obsolete
>--- tl-dbus-launch.sh.orig 2014-10-29 09:47:52.000000000 -0400 >+++ tl-dbus-launch.sh 2015-01-28 23:21:20.000000000 -0500 >@@ -8,6 +8,6 @@ > # > > # Start DBUS, if not already started >-if type dbus-launch && test -z "${DBUS_SESSION_BUS_ADDRESS}" ; then >+if type dbus-launch && test -z ${DBUS_SESSION_BUS_ADDRESS+x} ; then > eval `dbus-launch --sh-syntax --exit-with-session` > fi >--- tl-homecreatefilter.sh.orig 2014-10-29 09:48:07.000000000 -0400 >+++ tl-homecreatefilter.sh 2015-01-28 23:23:38.000000000 -0500 >@@ -6,7 +6,7 @@ > > ID=`id -u` > >-if [ -z "${TLPREFIX}" ]; then >+if [ -z ${TLPREFIX+x} ]; then > echo "Cannot work without TLPREFIX. Exiting." > elif [ "${ID}" -eq 0 ] ; then > echo "Root user detected - skipping homecreatefilter" >--- tl-kinit.sh.orig 2014-10-29 09:47:52.000000000 -0400 >+++ tl-kinit.sh 2015-01-28 23:16:10.000000000 -0500 >@@ -8,7 +8,7 @@ > # > > if type kinit; then >- if [ -z "${KRB5CCNAME}" ]; then >+ if [ -z ${KRB5CCNAME+x} ]; then > export KRB5CCNAME="${TLSESSIONDATA}/krb5cc" > fi > # -l without argument gives usage with both MIT and Heimdal >--- tl-lp-redir-launch.orig 2014-10-29 10:02:57.000000000 -0400 >+++ tl-lp-redir-launch 2015-01-28 23:24:04.000000000 -0500 >@@ -7,7 +7,7 @@ > # action: Setting up printer port redirection > # > >-if [ -z "${TLPREFIX}" ]; then >+if [ -z ${TLPREFIX+x} ]; then > echo "Cannot work without TLPREFIX. Exiting." > else > "${TLPREFIX}/bin/tl-while-x11" "${TLPREFIX}/libexec/tl-lp-redir" "${TLSESSIONDATA}/dev/lp0" thinlocal & >--- tl-run-xlogout.d.orig 2014-10-29 09:48:01.000000000 -0400 >+++ tl-run-xlogout.d 2015-01-28 23:24:30.000000000 -0500 >@@ -4,7 +4,7 @@ > # Copyright 2002-2014 Cendio AB. > # For more information, see http://www.cendio.com > >-if [ -z "${TLPREFIX}" ]; then >+if [ -z ${TLPREFIX+x} ]; then > echo "Cannot work without TLPREFIX. Exiting." > exit 1 > fi >--- tl-run-xstartup.d.orig 2014-10-29 09:48:01.000000000 -0400 >+++ tl-run-xstartup.d 2015-01-28 23:25:19.000000000 -0500 >@@ -9,14 +9,14 @@ > # executed for testing. > # > >-if [ -z "${TLPREFIX}" ]; then >+if [ -z ${TLPREFIX+x} ]; then > echo "Cannot work without TLPREFIX. Exiting." > exit 1 > fi > > source ${TLPREFIX}/libexec/functions > >-if [ -z "${TLSESSIONDATA}" ]; then >+if [ -z ${TLSESSIONDATA+x} ]; then > echo "TLSESSIONDATA is not set. Are you in a proper ThinLinc session?" > exit 1 > fi >--- tl-serial-redir.sh.orig 2014-10-29 09:47:52.000000000 -0400 >+++ tl-serial-redir.sh 2015-01-28 23:25:41.000000000 -0500 >@@ -7,7 +7,7 @@ > # action: Setting up serial port redirection > # > >-if [ -z "${TLPREFIX}" ]; then >+if [ -z ${TLPREFIX+x} ]; then > echo "Cannot work without TLPREFIX. Exiting." > else > if [ "${LD_PRELOAD}" ]; then >--- tl-ssh-askpass.orig 2015-01-28 23:22:47.000000000 -0500 >+++ tl-ssh-askpass 2015-01-28 23:26:03.000000000 -0500 >@@ -8,7 +8,7 @@ > ORIGIN=`(cd "\`dirname \"$ORIGIN\"\`"; pwd -P 2>/dev/null || pwd)` > > # Allow user to select which Python to use >-if [ -z "${PYTHON}" ]; then >+if [ -z ${PYTHON+x} ]; then > PYTHON="python" > fi >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 5411
: 596