if cmd == "attachservice":
		parser.set_usage("usage: %s %s groupname servicename" % (shell_cmd_name,cmd))

		(options, args) = parser.parse_args()
		if len(args)<2:
			print "Missing group and service name for attachservice operation"
			exit(0)

		if len(args)<3:
			print "Missing service name for attachservice operation"
			exit(0)
		
		gm = GroupManager()
		res = gm.attach_service(args[1],args[2])
		if res==-1:
			print 'There is no service group by that name. NOTE! the group must be a service group.'
			exit(0)
		if res==-2:
			print 'The service "%s" does not exist' % args[2]
			exit(0)

		if res==-3:
			print 'The service "%s" failed to load' % args[2]
			exit(0)
		
		if res==-4:
			print 'The service "%s" is already attached to "%s"' % (args[2],args[1])
			exit(0)