Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

install eucalyptus-cloud as 0755

  • Loading branch information...
commit 78865787b50c49d4841c5bf6571cd3861d383cb3 1 parent b22276c
root authored
View
3  clc/modules/bootstrap/Makefile
@@ -47,9 +47,8 @@ ggo:
gengetopt --input=arguments.ggo --file-name=eucalyptus-opts --func-name=arguments --arg-struct-name=eucalyptus_opts
install:
- #$(INSTALL) -m 4750 -o root eucalyptus-cloud $(sbindir)
$(INSTALL) -d $(sbindir)
- $(INSTALL) -m 4750 eucalyptus-cloud $(sbindir)/eucalyptus-cloud
+ $(INSTALL) -m 0755 eucalyptus-cloud $(sbindir)/eucalyptus-cloud
clean:
rm -f $(OBJS) eucalyptus-cloud
View
3  cluster/handlers.c
@@ -38,6 +38,9 @@ sem_t *instanceCacheLock=NULL;
vnetConfig *vnetconfig=NULL;
sem_t *vnetConfigLock=NULL;
+char *helpers[LASTHELPER] = {"ip", "kill"};
+char *helpers_path[LASTHELPER];
+
int doAttachVolume(ncMetadata *ccMeta, char *volumeId, char *instanceId, char *remoteDev, char *localDev) {
int i, j, rc, start, stop, ret=0;
ccInstance *myInstance;
View
1  cluster/handlers.h
@@ -9,6 +9,7 @@
#define OP_TIMEOUT 60
enum {SHARED_MEM, SHARED_FILE};
+enum{IP, KILL, LASTHELPER};
typedef struct virtualMachine_t {
View
2  tools/euca_conf.in
@@ -775,7 +775,7 @@ if [ -n "$NEWCLUS" ]; then
if [ -n "${FAKEREG}" ]; then
CMD="echo"
fi
- if ! eval $CMD ; then
+ if eval $CMD ; then
echo "ERROR: there is already a cluster registered with the system."
exit 1
fi
View
43 util/misc.c
@@ -22,6 +22,49 @@
#include <axis2_client.h>
#include <axis2_stub.h>
+int verify_helpers(char **helpers, char **helpers_path, int LASTHELPER) {
+ int i, done, rc, j;
+ char *tok, *toka, *path, *helper, file[1024], *save, *savea;
+ struct stat statbuf;
+
+ for (i=0; i<LASTHELPER; i++) {
+ path = strdup(getenv("PATH"));
+ if (!path) {
+ return(1);
+ }
+
+ tok = strtok_r(path, ":", &save);
+ done=0;
+ while(tok && !done) {
+ helper = strdup(helpers[i]);
+ toka = strtok_r(helper, ",", &savea);
+ while(toka && !done) {
+ snprintf(file, 1024, "%s/%s", tok, toka);
+ rc = stat(file, &statbuf);
+ if (rc) {
+ } else {
+ if (S_ISREG(statbuf.st_mode)) {
+ done++;
+ }
+ }
+ toka = strtok_r(NULL, ":", &savea);
+ }
+ tok = strtok_r(NULL, ":", &save);
+ if (helper) free(helper);
+ }
+ if (!done) {
+ logprintfl(EUCAERROR, "cannot find helper '%s' in your path\n", helpers[i]);
+ return(1);
+ }
+
+ helpers_path[i] = strdup(file);
+ free(path);
+ }
+
+ return(0);
+}
+
+
pid_t timewait(pid_t pid, int *status, int timeout) {
time_t timer=0;
int rc;
View
4 util/misc.h
@@ -111,4 +111,8 @@ int uint32compar(const void *ina, const void *inb);
int safekill(pid_t pid, char *procname, int sig, char *rootwrap);
int safekillfile(char *pidfile, char *procname, int sig, char *rootwrap);
+int verify_helpers(char **helpers, char **helpers_path, int LASTHELPER);
+
+
+
#endif
Please sign in to comment.
Something went wrong with that request. Please try again.