Magellan Linux

Diff of /mcore-src/trunk/mcore-tools/src/mcore-controld.in

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2421 by niro, Wed Sep 2 09:25:10 2015 UTC revision 2464 by niro, Tue Sep 8 08:21:02 2015 UTC
# Line 14  source ${MCORE_LIBDIR}/include/common.gl Line 14  source ${MCORE_LIBDIR}/include/common.gl
14  include ${MCORE_LIBDIR}/include/daemon.global.class  include ${MCORE_LIBDIR}/include/daemon.global.class
15  include ${MCORE_LIBDIR}/include/sessionauth.global.class  include ${MCORE_LIBDIR}/include/sessionauth.global.class
16  include ${MCORE_LIBDIR}/include/mysqlfunctions.global.class  include ${MCORE_LIBDIR}/include/mysqlfunctions.global.class
17    include ${MCORE_LIBDIR}/include/register.global.class
18  #include ${MCORE_LIBDIR}/include/hwdetection.global.class  #include ${MCORE_LIBDIR}/include/hwdetection.global.class
19    
20  # load control classes plugins  # load control classes plugins
21  load_classes control  load_classes control
22    
23  SQL_USER=alx  # config settings
24    include @@SYSCONFDIR@@/mcore/mcore.conf
25    
26    SQL_USER=alx_install
27  SQL_PASS=@lx  SQL_PASS=@lx
28  SQL_HOST=localhost  SQL_HOST=localhost
29  SQL_DB=alx_web  SQL_DB=alx_web
# Line 40  import_resource() Line 44  import_resource()
44   mysql_insert "${table}",serial="${serial}","${resource}"="${value}"   mysql_insert "${table}",serial="${serial}","${resource}"="${value}"
45  }  }
46    
 nsslsay()  
 {  
  nssl "${IP}" "${PORT}" << EOF  
 auth ${SSLSAY_USER} ${SSLSAY_PASS}  
 $@  
 quit  
 EOF  
 }  
   
47  control_client()  control_client()
48  {  {
49   local serial="$1"   local serial="$1"
# Line 103  do Line 98  do
98   get) run_class ;;   get) run_class ;;
99   set) run_class ;;   set) run_class ;;
100   auth) validate_auth ${GLOBAL_ARGV[*]:1} ;;   auth) validate_auth ${GLOBAL_ARGV[*]:1} ;;
101     certauth) validate_auth_certificate ${GLOBAL_ARGV[*]:1} ;;
102     register) valid_session && validate_client ${GLOBAL_ARGV[*]:1} ;;
103   provide) valid_session && print_provide ;;   provide) valid_session && print_provide ;;
104   require) valid_session && verify_requirements ;;   require) valid_session && verify_requirements ;;
105   reload) valid_session && mecho "reloading client classes ..." && load_classes client ;;   reload) valid_session && mecho "reloading client classes ..." && load_classes client ;;
# Line 126  do Line 123  do
123   else   else
124   mecho "You must authenticate yourself first!"   mecho "You must authenticate yourself first!"
125   mecho "  auth [username] [password]"   mecho "  auth [username] [password]"
126     mecho "or"
127     mecho "  certauth [certificate fingerprint]"
128   fi   fi
129   ;;   ;;
130    

Legend:
Removed from v.2421  
changed lines
  Added in v.2464