From: franklahm Date: Thu, 22 Oct 2009 08:36:30 +0000 (+0000) Subject: Private Webmin installation with our netatalk.wbm module X-Git-Tag: before-ipv6~46 X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=netatalk.git;a=commitdiff_plain;h=8d0c8495d71c7fadf2708d691a15584a252040f6 Private Webmin installation with our netatalk.wbm module --- diff --git a/NEWS b/NEWS index ffa9fba9..217a5709 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,8 @@ Changes in 2.1 * UPD: cdb/dbd CNID backend requires BerkeleyDB >= 4.6 * FIX: rewritten logger * FIX: afpd: UNIX permissions handling +* NEW: configure args to download and install a "private" Webmin instance + including only basic Webmin modules plus our netatalk.wbm. * NEW: cnid_metad: options -l and -f to configure logging * NEW: CNID database maintanance utility dbd * NEW: support BerkeleyDB upgrade. Starting with the next release diff --git a/config/Makefile.am b/config/Makefile.am index bb2fd1ab..8679c206 100644 --- a/config/Makefile.am +++ b/config/Makefile.am @@ -14,6 +14,11 @@ EXTRA_DIST = $(CONFFILES) $(TMPLFILES) $(PAMFILES) CLEANFILES = $(GENFILES) pkgconfdir = @PKGCONFDIR@ +webminpath = @WEBMIN_PATH@ +webminuser = @WEBMIN_USER@ +webminversion = @WEBMIN_VERSION@ +webminpass = @WEBMIN_PASS@ +webminport = @WEBMIN_PORT@ # # rule to parse template files @@ -41,6 +46,62 @@ install-config-files: $(CONFFILES) $(GENFILES) fi; \ done +install-webmin: + if test "x$(webminpath)" != "x"; then \ + if ! test -d "x$(webminpath)"; then \ + mkdir -p "$(webminpath)"; \ + fi; \ + cd "$(webminpath)"; \ + wget http://prdownloads.sourceforge.net/webadmin/webmin-$(webminversion).tar.gz ; \ + tar xzf webmin-$(webminversion).tar.gz; \ + rm webmin-$(webminversion).tar.gz; \ + mv webmin-$(webminversion) webmin; \ + cd webmin; \ + rm -r adsl-client apache at backup-config bacula-backup bandwidth bind8 bsdexports burner \ + cfengine cluster-copy cluster-cron cluster-passwd cluster-shell cluster-software cluster-useradmin \ + cluster-usermin cluster-webmin custom \ + cron dfsadmin dhcpd dnsadmin dovecot exim exports \ + fdisk fetchmail file filter firewall format frox fsdump grub heartbeat hpuxexports \ + htaccess-htpasswd idmapd images inetd inittab ipfilter ipfw ipsec jabber \ + ldap-server lilo logrotate lpadmin lvm \ + mailboxes mailcap majordomo man mon mscstyle3 mysql \ + net nis openslp pap phpini postfix postgresql ppp-client pptp-client pptp-server \ + procmail proftpd pserver qmailadmin raid rbac \ + samba sarg sendmail sentry sgiexports shell \ + shorewall smart-status smf software spam squid sshd \ + status stunnel tcpwrappers telnet time tunnel \ + updown usermin vgetty webalizer wuftpd xinetd zones; \ + wget https://sourceforge.net/projects/netatalk/files/Netatalk%20Webmin%20Module/0.9-beta2/netatalk.wbm.gz/download ; \ + tar xzf netatalk.wbm.gz; \ + rm netatalk.wbm.gz; \ + cd netatalk; \ + rm config; \ + echo "applevolumedefault_c=$(sysconfdir)/netatalk/AppleVolumes.default" >> config; \ + echo "applevolumesystem_c=$(sysconfdir)/netatalk/AppleVolumes.system" >> config; \ + echo "afpd_c=$(sysconfdir)/netatalk/afpd.conf" >> config; \ + echo "atalk_c=$(sysconfdir)/netatalk/atalk.conf" >> config; \ + echo "papd_c=$(sysconfdir)/netatalk/papd.conf" >> config; \ + echo "afpd_d=$(sbindir)/afpd" >> config; \ + echo "atalkd_d=$(sbindir)/atalkd" >> config; \ + echo "papd_d=$(sbindir)/papd" >> config; \ + echo "netatalk_c=@PAMDIR@/etc/pam.d" >> config; \ + echo "atalk_start=$(sysconfdir)/init.d/atalk" >> config; \ + echo "select_minUsers=" >> config; \ + echo "select_maxUsers=" >> config; \ + echo "atalk_nls=" >> config; \ + cd ..; \ + config_dir="$(sysconfdir)/netatalk/webmin-config" \ + var_dir="$(prefix)/var" \ + perl="`which perl`" \ + port="$(webminport)" \ + login="$(webminuser)" \ + password="$(webminpass)" \ + ssl=1 \ + atboot=1 \ + bootscript=netamin \ + ./setup.sh > /dev/null; \ + fi + # # pluggable authentication modules support # @@ -49,7 +110,7 @@ if USE_PAM pamdir = @PAMDIR@/etc/pam.d -install-data-local: install-config-files $(PAMFILES) +install-data-local: install-config-files install-webmin $(PAMFILES) $(mkinstalldirs) $(DESTDIR)$(pamdir) if test "x$(OVERWRITE_CONFIG)" = "xyes" -o ! -f $(DESTDIR)$(pamdir)/netatalk; then \ echo "$(INSTALL_DATA) $$f $(DESTDIR)$(pamdir)/netatalk"; \ @@ -68,7 +129,7 @@ uninstall-local: else -install-data-local: install-config-files +install-data-local: install-config-files install-webmin uninstall-local: for f in $(CONFFILES) $(GENFILES); do \ diff --git a/configure.in b/configure.in index 88857034..a0dff97e 100644 --- a/configure.in +++ b/configure.in @@ -1,4 +1,4 @@ -dnl $Id: configure.in,v 1.220 2009-10-02 09:32:40 franklahm Exp $ +dnl $Id: configure.in,v 1.221 2009-10-22 08:36:30 franklahm Exp $ dnl configure.in for netatalk AC_INIT(etc/afpd/main.c) @@ -1053,6 +1053,9 @@ if test "x$this_os" = "xsolaris"; then ) fi +dnl --------------------- Netatalk Webmin +NETATALK_WEBMIN + dnl --------------------- last minute substitutions AC_SUBST(LIBS) diff --git a/macros/webmin.m4 b/macros/webmin.m4 new file mode 100644 index 00000000..ec722c1e --- /dev/null +++ b/macros/webmin.m4 @@ -0,0 +1,85 @@ +dnl $Id: webmin.m4,v 1.1 2009-10-22 08:36:30 franklahm Exp $ +dnl Autoconf macro to install webmin + netatalk webmin module + +AC_DEFUN([NETATALK_WEBMIN],[ + AC_ARG_WITH(webmin, + [ --with-webmin=PATH path where webmin is installed [[$PKGCONFDIR/webmin]]], + if test "x$withval" = "xyes"; then + webminpath="$PKGCONFDIR" + elif test "x$withval" = "xno"; then + webminpath="" + else + webminpath="$withval" + fi + ) + + AC_ARG_WITH(webminuser, + [ --with-webminuser=NAME name for the webmin admin user], + if test "x$withval" = "xyes"; then + webminuser="" + elif test "x$withval" = "xno"; then + webminuser="" + else + webminuser="$withval" + fi + ) + + AC_ARG_WITH(webminversion, + [ --with-webminversion=VERSION Webmin version to fetch from sf.net [[1.490]]], + if test "x$withval" = "xyes"; then + webminversion="1.490" + elif test "x$withval" = "xno"; then + webminversions="1.490" + else + webminversion="$withval" + fi + ) + + AC_ARG_WITH(webminpass, + [ --with-webminpass=PASSWORD password for the webmin admin user], + if test "x$withval" = "xyes"; then + webminpass="" + elif test "x$withval" = "xno"; then + webminpass="" + else + webminpass="$withval" + fi + ) + + AC_ARG_WITH(webminport, + [ --with-webminport=PORT TCP port for webmin], + if test "x$withval" = "xyes"; then + webminport="" + elif test "x$withval" = "xno"; then + webminport="" + else + webminport="$withval" + fi + ) + + AC_MSG_CHECKING([if webmin administration shall be installed]) + if test "x$webminpath" != "x" && + test "x$webminuser" != "x" && + test "x$webminpass" != "x" && + test "x$webminport" != "x" && + test "x$webminversion" != "x"; then + AC_MSG_RESULT([yes]) + AC_MSG_CHECKING([if neccessary Perl module 'Net::SSLeay' is installed]) + $ac_cv_path_PERL -e 'use Net::SSLeay' >/dev/null 2>/dev/null + if test "$?" != "0" ; then + AC_MSG_RESULT([no]) + webminpath="" + else + AC_MSG_RESULT([yes]) + AC_MSG_NOTICE([Installing Webmin in "$webminpath/webmin"]) + fi + else + AC_MSG_RESULT([no]) + fi + + AC_SUBST(WEBMIN_PATH, $webminpath) + AC_SUBST(WEBMIN_VERSION, $webminversion) + AC_SUBST(WEBMIN_USER, $webminuser) + AC_SUBST(WEBMIN_PASS, $webminpass) + AC_SUBST(WEBMIN_PORT, $webminport) +]) \ No newline at end of file