Add syslog forwarding host to syslog-ng
# $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/files/syslog-ng.conf.gentoo,v 1.7 2007/08/02 04:52:18 mr_bones_ Exp $
#
# Syslog-ng default configuration file for Gentoo Linux
# contributed by Michael Sterrett
options {
chain_hostnames(off);
sync(0);
# The default action of syslog-ng 1.6.0 is to log a STATS line
# to the file every 10 minutes. That's pretty ugly after a while.
# Change it to every 12 hours so you get a nice daily update of
# how many messages syslog-ng missed (0).
stats(43200);
};
source src {
unix-stream("/dev/log" max-connections(256));
internal();
file("/proc/kmsg");
};
destination messages { file("/var/log/messages"); };
destination splunk { tcp("hostname-or-ip" port(9998)); };
# By default messages are logged to tty12...
destination console_all { file("/dev/tty12"); };
# ...if you intend to use /dev/console for programs like xconsole
# you can comment out the destination line above that references /dev/tty12
# and uncomment the line below.
#destination console_all { file("/dev/console"); };
log { source(src); destination(messages); };
log { source(src); destination(splunk); };
log { source(src); destination(console_all); };
Cannot join OpenSolaris CIFS service to Windows 2008 Domain
By default, our redirector uses NTLMv2 authentication. Prior to joining
your system to a Windows 2008 domain, please run the following command
on your Solaris system such that NTLM authentication will be used instead:
sharectl set -p lmauth_level=2 smb
This is a known issue with Windows Server 2008 which by default
disallows NTLMv2 authentication if the client doesn't support extended
security. Microsoft is working on a hot fix for this issue. Once it
becomes available, the above workaround will no longer be needed.
Reference: http://www.mail-archive.com/cifs-discuss@opensolaris.org/msg00170.html
Recursively delete .svn directories
Abstract
This is a simple example of a unix command, which recursively deletes subversion .svn folders. Subversion is a well-spread open-source revision control application. Every copy of source code received from subversion repository has .svn folders, which store metadata. However, if you want to use or distribute source code for end-user consumption, these folders are not necessary. A simple svn export [repository] is suitable.
Compatible
- Linux, FreeBSD, Mac OS X, Cygwin...
- Nearly any unix-compatible system with rm and find
We use find command to find all .svn folders beginning from current directory.
$ find . -type d -name .svn
./.svn ./sourceA/.svn ./sourceB/.svn ./sourceB/module/.svn ./sourceC/.svn
It is possible to pass these directories directly to rm command, using grave accent quotes (key to left of '1')
$ rm -rf `find . -type d -name .svn`
So, this will remove every .svn folder beginning from current directory.
Source code: bash script
#!/bin/sh echo "recursively removing .svn folders from" pwd rm -rf `find . -type d -name .svn`
You may save this script to /usr/bin/csvn (or other binary folder included in path) and use later to get 'clean' project source without typing lengthy commands.
For example,
$ svn checkout svn://server.com/svn/project A project/index.php A project/sourceA/a.php A project/sourceA/a1.php A project/sourceA/a2.php A project/sourceB/b.php A project/sourceB/module/lib.php A project/sourceC/c.php Checked out revision 15. $ cd project $ csvn
Warning
Always check you current working directory before calling 'csvn'.