krb5: allow installing without kadmind 8660/head
authorW. Michael Petullo <mike@flyn.org>
Thu, 11 Apr 2019 22:00:50 +0000 (18:00 -0400)
committerW. Michael Petullo <mike@flyn.org>
Fri, 12 Apr 2019 01:13:54 +0000 (21:13 -0400)
Signed-off-by: W. Michael Petullo <mike@flyn.org>
net/krb5/Makefile
net/krb5/files/krb5kdc

index fd1e86b37d630bb375c330eec17b9581b7f5cee1..d72e29d2e77a380bba8503d8801f2a17ed05a864 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=krb5
 PKG_VERSION:=1.17
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
 
@@ -50,6 +50,12 @@ define Package/krb5-server
        TITLE:=Kerberos 5 Server
 endef
 
+define Package/krb5-server-extras
+       $(call Package/krb5/Default)
+       DEPENDS:=+krb5-libs +libpthread
+       TITLE:=Kerberos 5 Admin Server
+endef
+
 define Package/krb5-client
        $(call Package/krb5/Default)
        DEPENDS:=+krb5-libs
@@ -124,22 +130,25 @@ endef
 define Package/krb5-server/install
        $(INSTALL_DIR) $(1)/etc/init.d
        $(INSTALL_BIN) ./files/krb5kdc $(1)/etc/init.d/krb5kdc
-#      $(INSTALL_DIR) $(1)/usr/bin
-#      $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sclient $(1)/usr/bin
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kadmin.local $(1)/usr/sbin
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kadmind $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kdb5_util $(1)/usr/sbin
-#      $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kprop $(1)/usr/sbin
-#      $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kpropd $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/krb5kdc $(1)/usr/sbin
-#      $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/sim_server $(1)/usr/sbin
+endef
+
+define Package/krb5-server-extras/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kadmind $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kprop $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kpropd $(1)/usr/sbin
 endef
 
 define Package/krb5-server/postinst
+mkdir -p $${IPKG_INSTROOT}/etc/krb5kdc
 touch $${IPKG_INSTROOT}/etc/krb5kdc/kadm5.acl
 endef
 
 $(eval $(call BuildPackage,krb5-libs))
 $(eval $(call BuildPackage,krb5-server))
+$(eval $(call BuildPackage,krb5-server-extras))
 $(eval $(call BuildPackage,krb5-client))
index dec7188e9b01e32f03b5fafbd300ce7780a182e4..fd428c933e46f235246905ad1f0a41b5f2511edc 100644 (file)
@@ -10,10 +10,10 @@ start() {
        [ -f /etc/krb5kdc/principal ] || ( echo; echo ) | kdb5_util create -s
        
        /usr/sbin/krb5kdc
-       /usr/sbin/kadmind
+       [ -x /usr/sbin/kadmind ] && /usr/sbin/kadmind
 }
 
 stop() {
        killall krb5kdc 2> /dev/null
-       killall kadmind 2> /dev/null
+       [ -x /usr/sbin/kadmind ] && killall kadmind 2> /dev/null
 }