Fedora Linux Support Community & Resources Center
  #1  
Old 19th September 2012, 08:51 AM
payot Offline
Registered User
 
Join Date: Apr 2010
Posts: 5
windows_7chrome
SS5 Misconfiguration

Dear All

I have compiled and made the ss5 as the instrustion had asked, it done perfectly but when I try to add u/p ,I get such error:

service ss5 restart
/etc/init.d/ss5: line 22: [: =: unary operator expected
Restarting ss5... /etc/init.d/ss5: line 22: [: =: unary operator expected
Shutting down ss5...
done [FAILED]
/etc/init.d/ss5: line 22: [: =: unary operator expected
[ERRO] Error parsing configuration file (see ss5.log file for details). SS5 exiting...
done


any idea?

thanks,
Reply With Quote
  #2  
Old 19th September 2012, 02:00 PM
mk27's Avatar
mk27 Offline
Registered User
 
Join Date: Dec 2008
Posts: 87
linuxfirefox
Re: SS5 Misconfiguration

Unary operators have only one operator, and anything in init.d is a shell script, so this sounds like a typo. Post the content of /etc/init.d/ss5, at least to line 22.
Reply With Quote
  #3  
Old 19th September 2012, 04:14 PM
payot Offline
Registered User
 
Join Date: Apr 2010
Posts: 5
windows_7chrome
Re: SS5 Misconfiguration

Thanks for your reply

Please See :


Code:
#!/bin/sh

export SS5_SOCKS_PORT=1010
export SS5_SOCKS_USER=root

#
# chkconfig: 345 20 80
# description: This script takes care of starting \
#              and stopping ss5
#

OS=`uname -s`
if [ $OS = "Linux" ] || [ $OS = "SunOS" ]; then
 
# Source function library.
 . /etc/rc.d/init.d/functions

# Source networking configuration.
 . /etc/sysconfig/network

# Check that networking is up.
 [ ${NETWORKING} = "no" ] && exit 0

 [ -f /usr/sbin/ss5 ] || exit 0
fi

# Test custom variables
test -f /etc/sysconfig/ss5 && . /etc/sysconfig/ss5

# See how we were called.
case "$1" in
  start)
        # Start daemon.
        echo -n "Starting ss5... "
	if [ $OS = "Linux" ]; then
            daemon /usr/sbin/ss5 -t $SS5_OPTS
            touch /var/lock/subsys/ss5
	else
	  if [ $OS = "SunOS" ]; then
              /usr/sbin/ss5 -t 
              touch /var/lock/subsys/ss5
	  else
              /usr/local/sbin/ss5 -t 
	  fi
	fi
	echo "done"
        ;;
  stop)
        # Stop daemon.
        echo "Shutting down ss5... "
	if [ $OS = "Linux" ] || [ $OS = "SunOS" ]; then
	killproc ss5
        rm -f /var/lock/subsys/ss5
	else
		killall ss5
	fi
	echo "done"
        ;;
  reload)
        # Reload configuration
	if [ $OS = "Linux" ] || [ $OS = "SunOS" ]; then
        echo -n "Reloading ss5... "
	killproc ss5 -1
	else
		pkill -HUP ss5
	fi
	echo "done reload"
	;;
  restart)
        # Restart daemon
        echo -n "Restarting ss5... "
	$0 stop
	$0 start
	;;
  status)
	if [ $OS = "Linux" ] || [ $OS = "SunOS" ]; then
	  status ss5
	fi
	;;
  *)
        echo "Usage: ss5 {start|stop|status|restart|reload}"
        exit 1
	;;
esac

exit 0
Reply With Quote
  #4  
Old 19th September 2012, 06:09 PM
mk27's Avatar
mk27 Offline
Registered User
 
Join Date: Dec 2008
Posts: 87
linuxfirefox
Re: SS5 Misconfiguration

Code:
# Check that networking is up.
 [ ${NETWORKING} = "no" ] && exit 0
This is an issue explained here (if you're interested in shell scripting) under "empty variables":

http://www.linuxcommand.org/wss0100.php

Anyway, try putting ${NETWORKING} in quotes:

Code:
# Check that networking is up.
 [ "${NETWORKING}" = "no" ] && exit 0
Which is how that check is done in the other fedora init scripts I looked at (otherwise, I'd think it would be better to see if NETWORKING = "yes"...but maybe we don't care as long as it doesn't = "no").

If that works, report it as a bug for SS5 at Fedora, since it's Fedora's script.

Maybe also post your /etc/sysconfig/network -- that's where NETWORKING should be defined, and it was sourced on line 19.
Reply With Quote
  #5  
Old 19th September 2012, 06:41 PM
payot Offline
Registered User
 
Join Date: Apr 2010
Posts: 5
windows_7chrome
Re: SS5 Misconfiguration

thanks dear mk27

your key advice solved the problem and I get this result:

# service ss5 restart
Restarting ss5... Shutting down ss5...
done [ OK ]
doneting ss5... [ OK ]
root@myhost [/etc/sysconfig]#

but maybe something still remind , becuase after I try to use it ,it does not effect the porxy

any advice?
Reply With Quote
  #6  
Old 19th September 2012, 09:04 PM
mk27's Avatar
mk27 Offline
Registered User
 
Join Date: Dec 2008
Posts: 87
linuxfirefox
Re: SS5 Misconfiguration

Quote:
Originally Posted by payot View Post
any advice?
I dunno anything about SS5 itself, sorry. It does appear to have a mailing list:

https://lists.sourceforge.net/lists/...fo/ss5-discuss

Although it may not be currently maintained...
Reply With Quote
Reply

Tags
misconfiguration, ss5

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
gateway misconfiguration EHCanadian Servers & Networking 5 17th January 2007 05:09 PM
sendmail misconfiguration? u-noneinc-s Servers & Networking 3 6th September 2005 01:22 PM


Current GMT-time: 18:32 (Saturday, 18-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat