From 0a3d25b1c8e8018444b8469d1bbcc5be6eaee264 Mon Sep 17 00:00:00 2001 From: Michael Howe Date: Fri, 27 Jan 2012 21:08:32 +0000 Subject: [PATCH 1/1] Created mh-sysadmin-tools, for all my sysadmin needs. --- Makefile | 11 +++++++++++ bin/rksu | 9 +++++++++ debian/README | 7 +++++++ debian/changelog | 6 ++++++ debian/compat | 1 + debian/control | 15 +++++++++++++++ debian/copyright | 31 +++++++++++++++++++++++++++++++ debian/docs | 0 debian/rules | 13 +++++++++++++ debian/source/format | 1 + 10 files changed, 94 insertions(+) create mode 100644 Makefile create mode 100755 bin/rksu create mode 100644 debian/README create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/docs create mode 100755 debian/rules create mode 100644 debian/source/format diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..2e517a2 --- /dev/null +++ b/Makefile @@ -0,0 +1,11 @@ +INSTALL = /usr/bin/install -c +srcdir = . + +build: +# no-op + +install: + $(INSTALL) -d $(DESTDIR)/usr/bin + $(INSTALL) -m 0755 $(srcdir)/bin/rksu $(DESTDIR)/usr/bin/rksu + +.PHONY: install diff --git a/bin/rksu b/bin/rksu new file mode 100755 index 0000000..0fe8417 --- /dev/null +++ b/bin/rksu @@ -0,0 +1,9 @@ +#!/bin/sh + +execargs='' +ADMINPATH=/sbin:/usr/sbin:/usr/local/sbin:/bin:/usr/bin:/usr/local/bin +if [ -n "$2" ]; then + execargs="-a -c '$2'" +fi + +ssh -oGSSAPIDelegateCredentials=yes -t $1 PATH=$ADMINPATH ksu -z $execargs diff --git a/debian/README b/debian/README new file mode 100644 index 0000000..3098bcb --- /dev/null +++ b/debian/README @@ -0,0 +1,7 @@ +The Debian Package mh-sysadmin-tools +---------------------------- + +This package contains various useful sysadmin-related utilities. Some of them +may have been inspired by OUCS Sysdev. + + -- Michael Howe Fri, 27 Jan 2012 20:35:48 +0000 diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..e309568 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,6 @@ +mh-sysadmin-tools (1.0) unstable; urgency=low + + * Initial Release. + * Contains the shell script rksu (idea stolen from sysdev) + + -- Michael Howe Fri, 27 Jan 2012 21:05:44 +0000 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..7f8f011 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +7 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..b23e4b9 --- /dev/null +++ b/debian/control @@ -0,0 +1,15 @@ +Source: mh-sysadmin-tools +Section: admin +Priority: optional +Maintainer: Michael Howe +Build-Depends: debhelper (>= 7.0.50~) +Standards-Version: 3.8.4 +#Vcs-Git: git://git.debian.org/collab-maint/mh-sysadmin-tools.git +#Vcs-Browser: http://git.debian.org/?p=collab-maint/mh-sysadmin-tools.git;a=summary + +Package: mh-sysadmin-tools +Architecture: all +Depends: ${misc:Depends}, krb5-user +Description: General sysadmin tools as used on the michaelhowe.org systems + This package contains simple scripts that are used for sysadmin work on + michaelhowe.org systems. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..61c99e4 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,31 @@ +This work was written and packaged by: + + Michael Howe on Fri, 27 Jan 2012 20:35:48 +0000 + +Copyright: + + + +License: + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +On Debian systems, the complete text of the GNU General +Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". + +The Debian packaging is: + + Copyright (C) 2012 Michael Howe + +and is licensed under the GPL version 3, see above. diff --git a/debian/docs b/debian/docs new file mode 100644 index 0000000..e69de29 diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..b760bee --- /dev/null +++ b/debian/rules @@ -0,0 +1,13 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +%: + dh $@ diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..89ae9db --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (native) -- 2.39.5