-if [ $ARCHITECTURE != 'Darwin' ]; then
- if ! grep -qP '5\.(6|7|8|9|10)' /etc/*release; then
- shopt -s autocd > /dev/null 2>&1
- shopt -s dirspell > /dev/null 2>&1
+if [ $ARCHITECTURE != 'Darwin' -a $ARCHITECTURE != 'sun' ]; then
+ ls /etc/*release > /dev/null 2>&1
+
+ if [ $? = 0 ]; then
+ if ! grep -qP '5\.(6|7|8|9|10)' /etc/*release; then
+ shopt -s autocd > /dev/null 2>&1
+ shopt -s dirspell > /dev/null 2>&1
+ fi