diff options
author | Eric Schrock <Eric.Schrock@Sun.COM> | 2008-12-17 11:06:48 -0800 |
---|---|---|
committer | Eric Schrock <Eric.Schrock@Sun.COM> | 2008-12-17 11:06:48 -0800 |
commit | c6fc6ddd482fa5c17788a38bd238258f2c22597c (patch) | |
tree | 086f3fae999ee457a417c5b4bf0335e27ea04512 /usr/src | |
parent | 6c7f40b3e72b5e6852c11af03745c0ace4d9984a (diff) | |
download | illumos-joyent-c6fc6ddd482fa5c17788a38bd238258f2c22597c.tar.gz |
6711375 sysevent runtime files should be under /var/run
Diffstat (limited to 'usr/src')
7 files changed, 27 insertions, 47 deletions
diff --git a/usr/src/cmd/syseventadm/syseventadm.c b/usr/src/cmd/syseventadm/syseventadm.c index 5d17367ac1..1b23c8fa8c 100644 --- a/usr/src/cmd/syseventadm/syseventadm.c +++ b/usr/src/cmd/syseventadm/syseventadm.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,12 +19,10 @@ * CDDL HEADER END */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * syseventadm - command to administer the sysevent.conf registry * - administers the general purpose event framework @@ -224,8 +221,8 @@ enter_lock(char *root_dir) { struct flock lock; - if (snprintf(lock_file, sizeof (lock_file), "%s%s/%s", root_dir, - SYSEVENT_CONFIG_DIR, LOCK_FILENAME) >= sizeof (lock_file)) { + if (snprintf(lock_file, sizeof (lock_file), "%s%s", root_dir, + LOCK_FILENAME) >= sizeof (lock_file)) { (void) fprintf(stderr, MSG_LOCK_PATH_ERR, whoami, lock_file); exit(EXIT_CMD_FAILED); } diff --git a/usr/src/cmd/syseventadm/syseventadm.h b/usr/src/cmd/syseventadm/syseventadm.h index 0fb39f9d70..e676655270 100644 --- a/usr/src/cmd/syseventadm/syseventadm.h +++ b/usr/src/cmd/syseventadm/syseventadm.h @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,15 +19,13 @@ * CDDL HEADER END */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ #ifndef _SYSEVENTADM_H #define _SYSEVENTADM_H -#pragma ident "%Z%%M% %I% %E% SMI" - #ifdef __cplusplus extern "C" { #endif @@ -41,7 +38,7 @@ extern "C" { /* * Lock file name to serialize registry updates */ -#define LOCK_FILENAME "sysevent.lock" +#define LOCK_FILENAME "/var/run/syseventconf.lock" /* * Required suffix for all sysevent.conf files diff --git a/usr/src/cmd/syseventd/daemons/syseventconfd/syseventconfd_door.h b/usr/src/cmd/syseventd/daemons/syseventconfd/syseventconfd_door.h index 763b56223d..afe2e4eecd 100644 --- a/usr/src/cmd/syseventd/daemons/syseventconfd/syseventconfd_door.h +++ b/usr/src/cmd/syseventd/daemons/syseventconfd/syseventconfd_door.h @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,15 +19,13 @@ * CDDL HEADER END */ /* - * Copyright (c) 2000-2001 by Sun Microsystems, Inc. - * All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. */ #ifndef _SYSEVENTCONFD_DOOR_H #define _SYSEVENTCONFD_DOOR_H -#pragma ident "%Z%%M% %I% %E% SMI" - #ifdef __cplusplus extern "C" { #endif @@ -37,7 +34,7 @@ extern "C" { * Door for channel sysevent_conf_mod -> syseventconfd */ #define SYSEVENTCONFD_SERVICE_DOOR \ - "/etc/sysevent/syseventconfd_event_channel" + "/var/run/syseventconfd_door" diff --git a/usr/src/cmd/syseventd/daemons/syseventd/syseventd.c b/usr/src/cmd/syseventd/daemons/syseventd/syseventd.c index 4ec3e88419..8e70bfd04d 100644 --- a/usr/src/cmd/syseventd/daemons/syseventd/syseventd.c +++ b/usr/src/cmd/syseventd/daemons/syseventd/syseventd.c @@ -20,12 +20,10 @@ */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * syseventd - The system event daemon * @@ -93,7 +91,7 @@ static mutex_t door_lock; /* sync door return access */ static rwlock_t mod_unload_lock; /* sync module unloading */ /* declarations and definitions for avoiding multiple daemons running */ -#define DAEMON_LOCK_FILE "/etc/sysevent/syseventd_lock" +#define DAEMON_LOCK_FILE "/var/run/syseventd.lock" char local_lock_file[PATH_MAX + 1]; static int hold_daemon_lock; static int daemon_lock_fd; diff --git a/usr/src/cmd/syseventd/modules/sysevent_conf_mod/sysevent_conf_mod.c b/usr/src/cmd/syseventd/modules/sysevent_conf_mod/sysevent_conf_mod.c index 2914df9ba0..65e43c1bc1 100644 --- a/usr/src/cmd/syseventd/modules/sysevent_conf_mod/sysevent_conf_mod.c +++ b/usr/src/cmd/syseventd/modules/sysevent_conf_mod/sysevent_conf_mod.c @@ -19,12 +19,10 @@ * CDDL HEADER END */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * sysevent_conf_mod - syseventd daemon sysevent.conf module * @@ -810,8 +808,7 @@ enter_lock(char *lock_file) struct flock lock; int lock_fd; - (void) snprintf(lock_file, PATH_MAX, "%s/%s", - SYSEVENT_CONFIG_DIR, LOCK_FILENAME); + (void) strlcpy(lock_file, LOCK_FILENAME, PATH_MAX); lock_fd = open(lock_file, O_CREAT|O_RDWR, 0644); if (lock_fd < 0) { syslog(LOG_ERR, MSG_LOCK_CREATE_ERR, diff --git a/usr/src/cmd/syseventd/modules/sysevent_conf_mod/sysevent_conf_mod.h b/usr/src/cmd/syseventd/modules/sysevent_conf_mod/sysevent_conf_mod.h index f4a1465a40..9ffdbeb623 100644 --- a/usr/src/cmd/syseventd/modules/sysevent_conf_mod/sysevent_conf_mod.h +++ b/usr/src/cmd/syseventd/modules/sysevent_conf_mod/sysevent_conf_mod.h @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,15 +20,13 @@ */ /* - * Copyright (c) 2000-2001 by Sun Microsystems, Inc. - * All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. */ #ifndef _SYSEVENT_CONF_MOD_H #define _SYSEVENT_CONF_MOD_H -#pragma ident "%Z%%M% %I% %E% SMI" - #ifdef __cplusplus extern "C" { #endif @@ -55,7 +52,7 @@ extern "C" { /* * Lock file name to serialize registry updates */ -#define LOCK_FILENAME "sysevent.lock" +#define LOCK_FILENAME "/var/run/syseventconf.lock" /* * sysevent.conf files list diff --git a/usr/src/uts/common/sys/sysevent_impl.h b/usr/src/uts/common/sys/sysevent_impl.h index ddd0972a1b..11115c8f2d 100644 --- a/usr/src/uts/common/sys/sysevent_impl.h +++ b/usr/src/uts/common/sys/sysevent_impl.h @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,15 +19,13 @@ * CDDL HEADER END */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ #ifndef _SYS_SYSEVENT_IMPL_H #define _SYS_SYSEVENT_IMPL_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/nvpair.h> #include <sys/id_space.h> #include <sys/door.h> @@ -154,7 +151,7 @@ typedef struct sys_event_impl { #define SE_ATTR_OFF(ev) SE_PUB_OFF(ev) + SE_ALIGN(strlen(SE_PUB_NAME(ev)) + 1) /* syseventd door */ -#define LOGEVENT_DOOR_UPCALL "/etc/sysevent/sysevent_door" +#define LOGEVENT_DOOR_UPCALL "/var/run/sysevent_door" /* * door upcall data structures |