That does not cause X to fail because it wont even try to start /etc/autopackage/paths-bash and just continues executing /etc/profile which is then allowed to finished successfully.
That line should be changed to (be more compatible with any shell):
if test -f "/etc/autopackage/paths-bash"; then . "/etc/autopackage/paths-bash"; fi
/etc/autopackage/paths-bash has:
function __autopackage_addBashPath
{
local name=$1
local path=$2
local append=$3
local kind
local tmp
local array
declare -a array
local IFS=':'
array=(${!name});
for DIR in "${array[@]}"; do
if [[ "$DIR" = "$path" ]]; then
return 0
fi
done
if [[ "${!name}" = "" ]]; then
eval "export $name=\"$path\""
elif $append; then
eval "export $name=\"$path:\$$name\""
else
eval "export $name=\"\$$name:$path\""
fi
return 0
}
Well obviously there is stuff in there which won't work with sh or bash...
Both these file syntax errors now only produce a few errors in the .xsession-error log now but the session runs without problems so I guess it's a minor issue.
But perhaps other packages depend on this which have unclarified errors at the moment where this is the root-cause.
There is still faulty bash code in 10.04 /etc/profile and /etc/autopackag e/paths- bash
/etc/profile has:
[[ -f "/etc/autopacka ge/paths- bash" ]] && . "/etc/autopacka ge/paths- bash"
That does not cause X to fail because it wont even try to start /etc/autopackag e/paths- bash and just continues executing /etc/profile which is then allowed to finished successfully.
That line should be changed to (be more compatible with any shell):
if test -f "/etc/autopacka ge/paths- bash"; then . "/etc/autopacka ge/paths- bash"; fi
/etc/autopackag e/paths- bash has:
function __autopackage_ addBashPath
{
local name=$1
local path=$2
local append=$3
local kind
local tmp
local array
declare -a array
local IFS=':'
array=(${!name});
for DIR in "${array[@]}"; do
if [[ "$DIR" = "$path" ]]; then
return 0
fi
done
if [[ "${!name}" = "" ]]; then "$path: \$$name\ "" "\$$name: $path\" "
eval "export $name=\"$path\""
elif $append; then
eval "export $name=\
else
eval "export $name=\
fi
return 0
}
Well obviously there is stuff in there which won't work with sh or bash...
Both these file syntax errors now only produce a few errors in the .xsession-error log now but the session runs without problems so I guess it's a minor issue.
But perhaps other packages depend on this which have unclarified errors at the moment where this is the root-cause.