search for: dolog

Displaying 14 results from an estimated 14 matches for "dolog".

Did you mean: do_log
2020 May 31
4
Simple backup of maildir folder
On 29 May 2020, at 23:49, Admin Beckspaced <admin at beckspaced.com> wrote: > I also have maildir as mailbox format and use the following script to do daily backups > > https://github.com/tachtler/dovecot-backup A couple of notes on this quite useful script: My mktemp does not support -p (FreeBSD 12.1) is I had to change the script to: DIR_TEMP=$($MKTEMP_COMMAND -d $TMP_FOLDER
1999 Apr 28
0
Transparent Samba Account Creation/Authentication using NT DC
...# Account Creation Options (useradd) # $CMNT = "created by samba_add_user"; # Comment passwd field $HOME = "-m"; # Make home directory $SHL = "/bin/false "; # Default shell # Quota Options (edquota) # $QUOTA_PROFILE = "qusr1"; # Quota profile sub dolog { # Enter message into syslog my $msg = shift; my $LOGGER="/usr/bin/logger -t samba_add_user -i -p $LOG_LEVEL"; `$LOGGER $msg`; } sub domail { # Report success/failure to 'root' via mail my $acct = shift; my $sta = shift; my $host = `hostname`;cho...
2013 Jan 03
20
[PATCH] Switch to poll in xenconsoled's io loop.
...eout : -1); if (log_reload) { handle_log_reload(); log_reload = 0; } - /* Abort if select failed, except for EINTR cases + /* Abort if poll failed, except for EINTR cases which indicate a possible log reload */ if (ret == -1) { if (errno == EINTR) continue; - dolog(LOG_ERR, "Failure in select: %d (%s)", + dolog(LOG_ERR, "Failure in poll: %d (%s)", errno, strerror(errno)); break; } - if (log_hv && FD_ISSET(xc_evtchn_fd(xce_handle), &readfds)) + if (log_hv && FD_REVENTS(xc_evtchn_fd(xce_handle)) &am...
2012 Dec 13
3
[PATCH] xenconsoled: use grant references instead of map_foreign_range
...terface(d); if (d->xce_handle != NULL) xc_evtchn_close(d->xce_handle); d->xce_handle = NULL; @@ -736,6 +757,13 @@ void enum_domains(void) xc_dominfo_t dominfo; struct domain *dom; + if (enum_pass == 0) { + xcg_handle = xc_gnttab_open(NULL, 0); + if (xcg_handle == NULL) { + dolog(LOG_DEBUG, "Failed to open xcg handle: %d (%s)", + errno, strerror(errno)); + } + } enum_pass++; while (xc_domain_getinfo(xc, domid, 1, &dominfo) == 1) { @@ -946,6 +974,7 @@ void handle_io(void) errno, strerror(errno)); goto out; } + log_hv_fd = create_...
2020 May 31
0
Simple backup of maildir folder
...tes on this quite useful script: > > My mktemp does not support -p (FreeBSD 12.1) is I had to change the script to: > In my scripts I tend to create a tempdir and then tempfiles within that. It makes the cleanup routine neater, e.g. at the top of my scripts : TEMP_DIR=$(mktemp -qd || { doLog "Failed to make temp dir !"; exit 1; }) rmTmpFiles() { rm -rf "${TEMP_DIR}"; } createTempFile() { local MYTEMP=$(mktemp -qp "${TEMP_DIR}" || doLog "Failed to create temp file"; exit 1); echo $MYTEMP; } Also my backup scripts have locking procedures built-in...
2020 May 31
1
Simple backup of maildir folder
...t; >> My mktemp does not support -p (FreeBSD 12.1) is I had to change the script to: >> > > > In my scripts I tend to create a tempdir and then tempfiles within that. It makes the cleanup routine neater, e.g. at the top of my scripts : > > TEMP_DIR=$(mktemp -qd || { doLog "Failed to make temp dir !"; exit 1; }) > rmTmpFiles() { rm -rf "${TEMP_DIR}"; } > createTempFile() { local MYTEMP=$(mktemp -qp "${TEMP_DIR}" || doLog "Failed to create temp file"; exit 1); echo $MYTEMP; } > I don?t think I need to clean up, and my...
2005 Aug 30
4
Re: [Xen-changelog] New console transport and update xenconsoled.
...uffer_append(struct buffer *buffer, const void *data, size_t size) >-{ >- if ((buffer->capacity - buffer->size) < size) { >- buffer->capacity += (size + 1024); >- buffer->data = realloc(buffer->data, buffer->capacity); >- if (buffer->data == NULL) { >- dolog(LOG_ERR, "Memory allocation failed"); >- exit(ENOMEM); >- } >- } >- >- memcpy(buffer->data + buffer->size, data, size); >- buffer->size += size; >- >- if (buffer->max_capacity && >- buffer->size > buffer->max_capacity) { >-...
2008 Jan 16
8
PATCH [xenconsoled]: makes pty slave raw early
Hi, on my system (Linux 2.6.18.8 - ia64), if a domain write on the xencons before xenconsole is initialized the domain gets back what it wrote. This patch fixes this issue by making raw the pty slave very early. (I suppose it doesn''t happen with linux as a guest because it takes a little bit of time before writing to xencons). Tristan. _______________________________________________
2011 Aug 10
1
Xen 4.1.1 packaging enhancement
Hi, This email is mainly addressed at Waldi (Bastian Blank). I'm resending it since the previous one is waiting for approval due to its size being bigger than 40k (I compressed the .diff this time, so it should be ok). I have worked on enhancing the current packaging of Xen 4.1.1 over the last weeks. The main goal was to package the OCaml libraries of Xen as separated binary packages, and
2006 Oct 17
0
[PATCH] misc compile fixes for tools on Solaris
...aemon/io.c +++ b/tools/console/daemon/io.c @@ -147,7 +147,7 @@ static int domain_create_tty(struct doma int master; bool success; - if ((master = getpt()) == -1 || + if ((master = open("/dev/ptmx",O_RDWR|O_NOCTTY)) == -1 || grantpt(master) == -1 || unlockpt(master) == -1) { dolog(LOG_ERR, "Failed to create tty for domain-%d", dom->domid); diff --git a/tools/console/daemon/utils.c b/tools/console/daemon/utils.c --- a/tools/console/daemon/utils.c +++ b/tools/console/daemon/utils.c @@ -95,7 +95,7 @@ void daemonize(const char *pidfile) exit(1); } -...
2013 Jan 10
10
[PATCH v2 1/2] xenconsoled: use grant references instead of map_foreign_range
...void shutdown_domain(struct domain *d) static unsigned enum_pass = 0; -void enum_domains(void) +static void enum_domains(void) { int domid = 1; xc_dominfo_t dominfo; @@ -957,6 +979,14 @@ void handle_io(void) } } + xcg_handle = xc_gnttab_open(NULL, 0); + if (xcg_handle == NULL) { + dolog(LOG_DEBUG, "Failed to open xcg handle: %d (%s)", + errno, strerror(errno)); + } + + enum_domains(); + for (;;) { struct domain *d, *n; int max_fd = -1; @@ -1097,6 +1127,10 @@ void handle_io(void) xc_evtchn_close(xce_handle); xce_handle = NULL; } + if (xcg_handle !=...
2004 Mar 02
2
[PATCH] Force mountd(8) to a specified port.
...7 @@ errx(1, "NFS server is not available or loadable"); } - while ((c = getopt(argc, argv, "2dlnr")) != -1) + while ((c = getopt(argc, argv, "2dlnp:r")) != -1) switch (c) { case '2': force_v2 = 1; @@ -315,6 +319,14 @@ case 'l': dolog = 1; break; + case 'p': + endptr = NULL; + svcport = (in_port_t)strtoul(optarg, &endptr, 10); + if (endptr == NULL || *endptr != '\0' || + svcport < IPPORT_RESERVEDSTART || + svcport >= IPPORT_MAX) + usage(); + break; default: usage();...
2011 Jan 11
0
[PATCH, v2]: xl: move domain struct init functions to libxl
..., libxl_domain_build_state *state) { memset(console, 0x00, sizeof(libxl_device_console)); diff -r efe2d3ea22ae tools/libxl/xl_cmdimpl.c --- a/tools/libxl/xl_cmdimpl.c Tue Jan 11 15:30:48 2011 +0000 +++ b/tools/libxl/xl_cmdimpl.c Tue Jan 11 15:40:45 2011 +0000 @@ -249,152 +249,6 @@ static void dolog(const char *file, int libxl_write_exactly(NULL, logfile, s, rc, NULL, NULL); } -static void init_create_info(libxl_domain_create_info *c_info) -{ - memset(c_info, ''\0'', sizeof(*c_info)); - c_info->xsdata = NULL; - c_info->platformdata = NULL; - c_inf...
2007 Oct 24
16
PATCH 0/10: Merge PV framebuffer & console into QEMU
The following series of 10 patches is a merge of the xenfb and xenconsoled functionality into the qemu-dm code. The general approach taken is to have qemu-dm provide two machine types - one for xen paravirt, the other for fullyvirt. For compatability the later is the default. The goals overall are to kill LibVNCServer, remove alot of code duplication and/or parallel impls of the same concepts, and