Merge commit 'origin/template' into login
authorroot <root@drsnuggles.stderr.nl>
Tue, 5 May 2009 14:26:47 +0000 (16:26 +0200)
committerroot <root@drsnuggles.stderr.nl>
Tue, 5 May 2009 14:26:47 +0000 (16:26 +0200)
* commit 'origin/template':
  rsyslog: Make the main queue disk-assisted as well.
  rsyslog: Enable queuing of log messages.
  nss: Add some comments.
  rsyslog: Send all logs to the log vserver.
  rsyslog: Move all rsyslog log files into a subdir.
  rsyslog: Update logrotate config to new rsyslog config.
  rsyslog: Add default logrotate config.
  rsyslog: Disable logging of kernel messages.
  rsyslog: Enable loggin of mark lines.
  rsyslog: Clean up rsyslog configuration.
  rsyslog: Add default configuration.
  pam: Add pam_permit to the auth section of chfn.
  nss: Update to use our custom LDAP schema.
  apt: Set the Default-Release to "stable".

etc/hostname [new file with mode: 0644]
etc/mailname [new file with mode: 0644]
usr/local/bin/git-prepend-base [new file with mode: 0755]
usr/local/bin/git-receive-pack [new symlink]
usr/local/bin/git-upload-pack [new symlink]

diff --git a/etc/hostname b/etc/hostname
new file mode 100644 (file)
index 0000000..b4fb918
--- /dev/null
@@ -0,0 +1 @@
+login.drsnuggles.stderr.nl
diff --git a/etc/mailname b/etc/mailname
new file mode 100644 (file)
index 0000000..b4fb918
--- /dev/null
@@ -0,0 +1 @@
+login.drsnuggles.stderr.nl
diff --git a/usr/local/bin/git-prepend-base b/usr/local/bin/git-prepend-base
new file mode 100755 (executable)
index 0000000..6b524cb
--- /dev/null
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+# This script prepends BASE_PATH to any arguments that are not options (start
+# with --) and do not start with BASE_PATH already.
+# It then executes its equivalent in /usr/bin with those updated arguments.
+#
+# This script is meant to provide a base path for accessing git repositories
+# through ssh. This is similar to running git-daemon(1) with --base-path and
+# --base-path-relaxed. 
+
+BASE_PATH='/data/vcs/git'
+
+# We keep an array of arguments, so we can handle quoting an spaces in
+# arguments properly.
+ARGS=()
+i=0
+until [ "$#" -eq 0 ]
+do
+       if ! echo $1 | egrep "^(--|$BASE_PATH)" &>/dev/null; then
+               ARGS[$i]="$BASE_PATH/$1"
+       else
+               ARGS[$i]="$1"
+       fi
+       ((i++))
+       shift
+done
+
+exec /usr/bin/`basename $0` "${ARGS[@]}"
diff --git a/usr/local/bin/git-receive-pack b/usr/local/bin/git-receive-pack
new file mode 120000 (symlink)
index 0000000..f0c4399
--- /dev/null
@@ -0,0 +1 @@
+git-prepend-base
\ No newline at end of file
diff --git a/usr/local/bin/git-upload-pack b/usr/local/bin/git-upload-pack
new file mode 120000 (symlink)
index 0000000..f0c4399
--- /dev/null
@@ -0,0 +1 @@
+git-prepend-base
\ No newline at end of file