]> arthur.barton.de Git - netatalk.git/commitdiff
Private Webmin installation with our netatalk.wbm module
authorfranklahm <franklahm>
Thu, 22 Oct 2009 08:36:30 +0000 (08:36 +0000)
committerfranklahm <franklahm>
Thu, 22 Oct 2009 08:36:30 +0000 (08:36 +0000)
NEWS
config/Makefile.am
configure.in
macros/webmin.m4 [new file with mode: 0644]

diff --git a/NEWS b/NEWS
index ffa9fba942369573156e7fb9f3ad55add61ef0fe..217a5709a8b32d2210810115392d4e9c6908df95 100644 (file)
--- 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
 * 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
 * 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
index bb2fd1ab4b9a020622dc209a0f7f66e67698f360..8679c206cb0acd8c083dcc4d96d6fd60401cc22b 100644 (file)
@@ -14,6 +14,11 @@ EXTRA_DIST = $(CONFFILES) $(TMPLFILES) $(PAMFILES)
 CLEANFILES = $(GENFILES)
 
 pkgconfdir = @PKGCONFDIR@
 CLEANFILES = $(GENFILES)
 
 pkgconfdir = @PKGCONFDIR@
+webminpath = @WEBMIN_PATH@
+webminuser = @WEBMIN_USER@
+webminversion = @WEBMIN_VERSION@
+webminpass = @WEBMIN_PASS@
+webminport = @WEBMIN_PORT@
 
 #
 # rule to parse template files
 
 #
 # rule to parse template files
@@ -41,6 +46,62 @@ install-config-files: $(CONFFILES) $(GENFILES)
                fi; \
        done
 
                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
 #
 #
 # pluggable authentication modules support
 #
@@ -49,7 +110,7 @@ if USE_PAM
 
 pamdir = @PAMDIR@/etc/pam.d
 
 
 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"; \
        $(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
 
 
 else
 
-install-data-local: install-config-files
+install-data-local: install-config-files install-webmin
 
 uninstall-local:
        for f in $(CONFFILES) $(GENFILES); do \
 
 uninstall-local:
        for f in $(CONFFILES) $(GENFILES); do \
index 88857034dc4e8a866f9ac601dd6e656a9ff2e57a..a0dff97e2e57827b9958aa367f2710ea8222b62d 100644 (file)
@@ -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)
 dnl configure.in for netatalk
 
 AC_INIT(etc/afpd/main.c)
@@ -1053,6 +1053,9 @@ if test "x$this_os" = "xsolaris"; then
     )
 fi
 
     )
 fi
 
+dnl --------------------- Netatalk Webmin
+NETATALK_WEBMIN
+
 dnl --------------------- last minute substitutions
 
 AC_SUBST(LIBS)
 dnl --------------------- last minute substitutions
 
 AC_SUBST(LIBS)
diff --git a/macros/webmin.m4 b/macros/webmin.m4
new file mode 100644 (file)
index 0000000..ec722c1
--- /dev/null
@@ -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