From d4141ba5a1ca0a3374cbd2e0ff55b3c63719ec28 Mon Sep 17 00:00:00 2001 From: Håkon Nessjøen Date: Sun, 27 Feb 2011 16:08:26 +0100 Subject: Removed .deb specific files and updated makefile/readme --- Makefile | 4 +- README.markdown | 4 +- config/mactelnetd.init | 21 +++++++++ config/mactelnetd.users | 9 +++- debian/README | 55 ---------------------- debian/changelog | 36 -------------- debian/compat | 1 - debian/conffiles | 1 - debian/control | 14 ------ debian/copyright | 40 ---------------- debian/dirs | 2 - debian/docs | 1 - debian/rules | 122 ------------------------------------------------ 13 files changed, 34 insertions(+), 276 deletions(-) create mode 100644 config/mactelnetd.init delete mode 100644 debian/README delete mode 100644 debian/changelog delete mode 100644 debian/compat delete mode 100644 debian/conffiles delete mode 100644 debian/control delete mode 100644 debian/copyright delete mode 100644 debian/dirs delete mode 100644 debian/docs delete mode 100755 debian/rules diff --git a/Makefile b/Makefile index e7d7361..7c49c58 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,9 @@ install: all strip-all cp macping $(DESTDIR)/usr/bin/ cp mactelnet $(DESTDIR)/usr/bin/ cp mactelnetd $(DESTDIR)/usr/sbin/ - cp mactelnetd.users $(DESTDIR)/etc/ + cp config/mactelnetd.users $(DESTDIR)/etc/ +# Ubuntu upstart script +# cp config/mactelnetd.init /etc/init/ chown root $(DESTDIR)/etc/mactelnetd.users chmod 600 $(DESTDIR)/etc/mactelnetd.users diff --git a/README.markdown b/README.markdown index 7e51ebb..e1bd784 100644 --- a/README.markdown +++ b/README.markdown @@ -4,8 +4,6 @@ MAC-Telnet for Linux A linux console tool for connecting to MikroTik RouterOS devices via their ethernet address. -NB: Beta stage code. Do not expect to run flawlessy. - Installation ------------ @@ -18,6 +16,8 @@ Then download source tarball, extract, compile and install: Now you're ready. +TIP: You can use the well known "expect" tool to automate/script dialogues via mactelnet! + Usage ----- diff --git a/config/mactelnetd.init b/config/mactelnetd.init new file mode 100644 index 0000000..b7ddddf --- /dev/null +++ b/config/mactelnetd.init @@ -0,0 +1,21 @@ +# mactelnetd - MAC-Telnet server +# +# The MAC-Telnet server provides telnet access via MAC addresses. +# +# Ubuntu upstart config: + +description "MAC-Telnet server" + +start on filesystem +stop on runlevel [!2345] + +respawn +respawn limit 10 5 +umask 022 + +pre-start script + test -O /etc/mactelnetd.users || { stop; exit 0; } + test -x /usr/sbin/mactelnetd || { stop; exit 0; } +end script + +exec /usr/sbin/mactelnetd -f diff --git a/config/mactelnetd.users b/config/mactelnetd.users index 7b215e1..c140e36 100644 --- a/config/mactelnetd.users +++ b/config/mactelnetd.users @@ -1,5 +1,12 @@ # Users file for MAC-Telnetd -# Use existing usernames from your system +# +#################################################################### +# WARNING: This file has passwords written in plain-text. # +# Make sure this file is owned and only readable by root. # +#################################################################### +# +# Each line consists of a username and a password seperated by :. +# Usernames must be existing users from passwd. # # Format: #username:password diff --git a/debian/README b/debian/README deleted file mode 100644 index b10515c..0000000 --- a/debian/README +++ /dev/null @@ -1,55 +0,0 @@ -MAC-Telnet for Linux -==================== - -A linux console tool for connecting to MikroTik RouterOS devices via their -ethernet address. - -NB: Beta stage code. Do not expect to run flawlessy. - -Installation ------------- - -Then download source tarball, extract, compile and install: - - wget http://github.com/haakonnessjoen/MAC-Telnet/tarball/master - tar zxvf haakonness*.tar.gz - cd haakonness*/ - make all install - -Now you're ready. - -Usage ------ - - # mactelnet -h - Usage: ./mactelnet [-h] [-n] [-t ] [-u ] [-p ] - - Parameters: - MAC MAC-Address of the RouterOS device. Use mndp to discover them. - identity The identity/name of your RouterOS device. Uses MNDP protocol to find it.. - -n Do not use broadcast packets. Less insecure but requires root privileges. - -t Amount of seconds to wait for a response on each interface. - -u Specify username on command line. - -p Specify password on command line. - -h This help. - - - Example: - - $ ./mactelnet 0:c:42:43:58:a5 -u admin - Password: - Connecting to 0:c:42:43:58:a5...done - - - MMM MMM KKK TTTTTTTTTTT KKK - MMMM MMMM KKK TTTTTTTTTTT KKK - MMM MMMM MMM III KKK KKK RRRRRR OOOOOO TTT III KKK KKK - MMM MM MMM III KKKKK RRR RRR OOO OOO TTT III KKKKK - MMM MMM III KKK KKK RRRRRR OOO OOO TTT III KKK KKK - MMM MMM III KKK KKK RRR RRR OOOOOO TTT III KKK KKK - - MikroTik RouterOS 4.0 (c) 1999-2009 http://www.mikrotik.com/ - - - [admin@HMG] > - diff --git a/debian/changelog b/debian/changelog deleted file mode 100644 index 461d14f..0000000 --- a/debian/changelog +++ /dev/null @@ -1,36 +0,0 @@ -mactelnet (0.2-1ubuntu1) unstable; urgency=low - - * 52edeba Add support for dash-seperated mac addresses - * 25476c7 Moved global protocol info to protocol header, where it belongs - * 8e2e73c Added simple DATA packet retransmission support. - * 93d82ea Change naming convention on variable names as well - * 2d9057c Changed naming convention on function names - * dbadc1a Fixed a bug where the mndp port/socket was not closed after a parseMNDP call. - * c91ff96 Cleaned up code and added -Wall to the compiler flags. Moved packet types over to enums for more ease of use. - * 2074658 Added u/wtmp logout code, and did some minior code cleanup. - * fae8147 Show mac address of client in syslog, and save correct mac address for wtmp. - * ff590f3 Fix silly bug that made mactelnetd connections time out after only 65k bytes - * 53ef36c Added syslog logging. Added daemonizing of application. Cleaned up login code to correctly set up controlling terminal. - * 1cf099b Added "nologin" support. And cleaned up a little duplicated code. - * fadddf3 Fix silly warning about ether_ntoa argument - * bc9266f Added wtmp/utmp support. Fixed setuid/setgid bug and error detection. Added motd message. Minior code cleanup. - * 1fb3f64 Code cleanup in mactelnet daemon - * 59525a2 Added a little documentation in the source code - * 3f66904 Handle network devices without address information correctly. - * 749229f Skip loopback interfaces. They seldom/never have a MAC address, and you probably won't run a MAC-Telnet server there. Speeds up autodetect. - * 1c11ee9 Added missing file, documentation fixup, and minifixup in makefile - * 3103d2c Started code for auto-detecting interface. Working proof of concept version. Raw socket version not updated yet. - * 40362c4 Simplified the way parseControlPacket is looped/called - * a993f53 Minior fix: Move mac-address code downwards according to the order of arguments. So problems with the ifname will be reported before problems with the mac addr - * 50d0439 Removed dependency of libssl/crypto. Added L. Peter Deutsch's implementation of MD5 instead. - -mactelnet (0.1-1ubuntu1) unstable; urgency=low - - * Removed libssl dependency - - -- Haakon Nessjoen Mon, 01 Nov 2010 23:01:49 +0200 -mactelnet (0.1-0ubuntu1) unstable; urgency=low - - * Initial Release. - - -- Haakon Nessjoen Mon, 04 Oct 2010 23:16:17 +0200 diff --git a/debian/compat b/debian/compat deleted file mode 100644 index 7f8f011..0000000 --- a/debian/compat +++ /dev/null @@ -1 +0,0 @@ -7 diff --git a/debian/conffiles b/debian/conffiles deleted file mode 100644 index 1c365b0..0000000 --- a/debian/conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/mactelnetd.users diff --git a/debian/control b/debian/control deleted file mode 100644 index 9cac6cb..0000000 --- a/debian/control +++ /dev/null @@ -1,14 +0,0 @@ -Source: mactelnet -Section: net -Priority: extra -Maintainer: Haakon Nessjoen -Build-Depends: debhelper (>= 7), linux-libc-dev (>= 2.6) -Standards-Version: 3.8.0 -Homepage: http://github.com/haakonnessjoen/MAC-Telnet/ - -Package: mactelnet -Architecture: any -Depends: libc6 (>= 2.9) -Description: MAC-Telnet client for Linux - A linux console tool for connecting to MikroTik RouterOS devices via their ethernet address. - diff --git a/debian/copyright b/debian/copyright deleted file mode 100644 index 6e825b3..0000000 --- a/debian/copyright +++ /dev/null @@ -1,40 +0,0 @@ -This package was debianized by: - - Hakon Nessjoen on Mon, 04 Oct 2010 23:16:17 +0200 - -It was downloaded from: - - http://github.com/haakonnessjoen/MAC-Telnet - -Upstream Author(s): - - Hakon Nessjoen - -Copyright: - - Copyright (C) 2010 Haakon Nessjoeen - -License: - This package 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 2 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 package; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -On Debian systems, the complete text of the GNU General -Public License can be found in `/usr/share/common-licenses/GPL'. - -The Debian packaging is: - - Copyright C) 2010, Haakon Nessjoen - -and is licensed under the GPL, see above. - diff --git a/debian/dirs b/debian/dirs deleted file mode 100644 index ca882bb..0000000 --- a/debian/dirs +++ /dev/null @@ -1,2 +0,0 @@ -usr/bin -usr/sbin diff --git a/debian/docs b/debian/docs deleted file mode 100644 index 8d526b9..0000000 --- a/debian/docs +++ /dev/null @@ -1 +0,0 @@ -README.markdown diff --git a/debian/rules b/debian/rules deleted file mode 100755 index 1e68b5f..0000000 --- a/debian/rules +++ /dev/null @@ -1,122 +0,0 @@ -#!/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. -# -# Modified to make a template file for a multi-binary package with separated -# build-arch and build-indep targets by Bill Allombert 2001 - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - -# This has to be exported to make some magic below work. -export DH_OPTIONS - - - - - - -configure: configure-stamp -configure-stamp: - dh_testdir - # Add here commands to configure the package. - - touch configure-stamp - - -#Architecture -build: build-arch build-indep - -build-arch: build-arch-stamp -build-arch-stamp: configure-stamp - - # Add here commands to compile the arch part of the package. - #$(MAKE) - touch $@ - -build-indep: build-indep-stamp -build-indep-stamp: configure-stamp - - # Add here commands to compile the indep part of the package. - #$(MAKE) doc - touch $@ - -clean: - dh_testdir - dh_testroot - rm -f build-arch-stamp build-indep-stamp configure-stamp - - $(MAKE) clean - - dh_clean - -install: install-indep install-arch -install-indep: - dh_testdir - dh_testroot - dh_prep -i - dh_installdirs -i - - # Add here commands to install the indep part of the package into - # debian/-doc. - #INSTALLDOC# - - dh_install -i - -install-arch: - dh_testdir - dh_testroot - dh_prep -s - dh_installdirs -s - - # Add here commands to install the arch part of the package into - # debian/tmp. - $(MAKE) DESTDIR=$(CURDIR)/debian/mactelnet install - - dh_install -s -# Must not depend on anything. This is to be called by -# binary-arch/binary-indep -# in another 'make' thread. -binary-common: - dh_testdir - dh_testroot - dh_installchangelogs -# dh_installdocs -# dh_installexamples -# dh_installmenu -# dh_installdebconf -# dh_installlogrotate -# dh_installemacsen -# dh_installpam -# dh_installmime -# dh_python -# dh_installinit -# dh_installcron -# dh_installinfo -# dh_installman - dh_link - dh_strip - dh_compress - dh_fixperms -# dh_perl - dh_makeshlibs - dh_installdeb - dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb -# Build architecture independant packages using the common target. -binary-indep: build-indep install-indep - $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common - -# Build architecture dependant packages using the common target. -binary-arch: build-arch install-arch - $(MAKE) -f debian/rules DH_OPTIONS=-s binary-common - -binary: binary-arch binary-indep -.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure -- cgit v1.2.3