diff --git a/make/target-blobs.mk b/make/target-blobs.mk index 7f9eb9b6..1b8307b6 100644 --- a/make/target-blobs.mk +++ b/make/target-blobs.mk @@ -381,9 +381,9 @@ vuplus-platform-util: $(DL_DIR)/$(BOXMODEL_PLATFORM_UTIL_SOURCE) | $(TARGET_DIR) $(REMOVE)/$(BOXMODEL_PLATFORM_UTIL_DIR) $(UNTAR)/$(BOXMODEL_PLATFORM_UTIL_SOURCE) $(INSTALL_EXEC) -D $(BUILD_DIR)/$(BOXMODEL_PLATFORM_UTIL_DIR)/* $(TARGET_bindir) - $(INSTALL_EXEC) -D $(TARGET_FILES)/scripts/vuplus-platform-util.init $(TARGET_sysconfdir)/init.d/vuplus-platform-util + $(INSTALL_EXEC) -D $(PKG_FILES_DIR)/vuplus-platform-util.init $(TARGET_sysconfdir)/init.d/vuplus-platform-util ifeq ($(BOXMODEL),$(filter $(BOXMODEL),vuduo4k)) - $(INSTALL_EXEC) -D $(TARGET_FILES)/scripts/bp3flash.sh $(TARGET_bindir)/bp3flash.sh + $(INSTALL_EXEC) -D $(PKG_FILES_DIR)/bp3flash.sh $(TARGET_bindir)/bp3flash.sh endif $(REMOVE)/$(BOXMODEL_PLATFORM_UTIL_DIR) $(TOUCH) diff --git a/make/target-neutrino.mk b/make/target-neutrino.mk index ea2b2de3..ee74358e 100644 --- a/make/target-neutrino.mk +++ b/make/target-neutrino.mk @@ -188,16 +188,11 @@ $(NEUTRINO_BUILD_DIR)/config.status: $(NEUTRINO_DEPS) neutrino: $(NEUTRINO_BUILD_DIR)/config.status $(MAKE) -C $(NEUTRINO_BUILD_DIR) $(MAKE) -C $(NEUTRINO_BUILD_DIR) install DESTDIR=$(NEUTRINO_INST_DIR) - $(MAKE) $(TARGET_sysconfdir)/init.d/start_neutrino + $(INSTALL_EXEC) $(PKG_FILES_DIR)/start_neutrino.$(BOXTYPE) $(TARGET_sysconfdir)/init.d/start_neutrino $(TOUCH) # ----------------------------------------------------------------------------- -$(TARGET_sysconfdir)/init.d/start_neutrino: - $(INSTALL_EXEC) -D $(TARGET_FILES)/scripts/start_neutrino.$(BOXTYPE) $(@) - -# ----------------------------------------------------------------------------- - LIBSTB_HAL_DEPS = LIBSTB_HAL_DEPS += ffmpeg LIBSTB_HAL_DEPS += openthreads diff --git a/make/target-tools.mk b/make/target-tools.mk index c0db2ec1..fd9ce8b8 100644 --- a/make/target-tools.mk +++ b/make/target-tools.mk @@ -936,7 +936,7 @@ ntp: $(NTP_DEPS) $(DL_DIR)/$(NTP_SOURCE) | $(TARGET_DIR) $(CONFIGURE); \ $(MAKE); \ $(INSTALL_EXEC) -D ntpdate/ntpdate $(TARGET_sbindir)/ntpdate - $(INSTALL_EXEC) -D $(TARGET_FILES)/scripts/ntpdate.init $(TARGET_sysconfdir)/init.d/ntpdate + $(INSTALL_EXEC) -D $(PKG_FILES_DIR)/ntpdate.init $(TARGET_sysconfdir)/init.d/ntpdate $(REMOVE)/$(PKG_DIR) $(TOUCH) @@ -967,7 +967,7 @@ djmount: $(DJMOUNT_DEPS) $(DL_DIR)/$(DJMOUNT_SOURCE) | $(TARGET_DIR) $(CONFIGURE); \ $(MAKE1); \ $(MAKE1) install DESTDIR=$(TARGET_DIR) - $(INSTALL_EXEC) -D $(TARGET_FILES)/scripts/djmount.init $(TARGET_sysconfdir)/init.d/djmount + $(INSTALL_EXEC) -D $(PKG_FILES_DIR)/djmount.init $(TARGET_sysconfdir)/init.d/djmount $(UPDATE-RC.D) djmount defaults 75 25 $(REMOVE)/$(PKG_DIR) $(TOUCH) @@ -1001,9 +1001,9 @@ ushare: $(USHARE_DEPS) $(DL_DIR)/$(USHARE_SOURCE) | $(TARGET_DIR) ln -sf ../config.h src/; \ $(MAKE); \ $(MAKE) install DESTDIR=$(TARGET_DIR) - $(INSTALL_DATA) -D $(TARGET_FILES)/configs/ushare.conf $(TARGET_sysconfdir)/ushare.conf + $(INSTALL_DATA) -D $(PKG_FILES_DIR)/ushare.conf $(TARGET_sysconfdir)/ushare.conf $(SED) 's|%(BOXTYPE)|$(BOXTYPE)|; s|%(BOXMODEL)|$(BOXMODEL)|' $(TARGET_sysconfdir)/ushare.conf - $(INSTALL_EXEC) -D $(TARGET_FILES)/scripts/ushare.init $(TARGET_sysconfdir)/init.d/ushare + $(INSTALL_EXEC) -D $(PKG_FILES_DIR)/ushare.init $(TARGET_sysconfdir)/init.d/ushare $(UPDATE-RC.D) ushare defaults 75 25 $(REMOVE)/$(PKG_DIR) $(TOUCH) @@ -1062,7 +1062,7 @@ minidlna: $(MINIDLNA_DEPS) $(DL_DIR)/$(MINIDLNA_SOURCE) | $(TARGET_DIR) $(SED) 's|^media_dir=.*|media_dir=A,/media/sda1/music\nmedia_dir=V,/media/sda1/movies\nmedia_dir=P,/media/sda1/pictures|' $(TARGET_sysconfdir)/minidlna.conf $(SED) 's|^#user=.*|user=root|' $(TARGET_sysconfdir)/minidlna.conf $(SED) 's|^#friendly_name=.*|friendly_name=$(BOXTYPE)-$(BOXMODEL):ReadyMedia|' $(TARGET_sysconfdir)/minidlna.conf - $(INSTALL_EXEC) -D $(TARGET_FILES)/scripts/minidlnad.init $(TARGET_sysconfdir)/init.d/minidlnad + $(INSTALL_EXEC) -D $(PKG_FILES_DIR)/minidlnad.init $(TARGET_sysconfdir)/init.d/minidlnad $(UPDATE-RC.D) minidlnad defaults 75 25 $(REMOVE)/$(PKG_DIR) $(TOUCH) @@ -1112,9 +1112,9 @@ inadyn: $(INADYN_DEPS) $(DL_DIR)/$(INADYN_SOURCE) | $(TARGET_DIR) $(CONFIGURE); \ $(MAKE); \ $(MAKE) install DESTDIR=$(TARGET_DIR) - $(INSTALL_DATA) -D $(TARGET_FILES)/configs/inadyn.conf $(TARGET_localstatedir)/etc/inadyn.conf + $(INSTALL_DATA) -D $(PKG_FILES_DIR)/inadyn.conf $(TARGET_localstatedir)/etc/inadyn.conf ln -sf /var/etc/inadyn.conf $(TARGET_sysconfdir)/inadyn.conf - $(INSTALL_EXEC) -D $(TARGET_FILES)/scripts/inadyn.init $(TARGET_sysconfdir)/init.d/inadyn + $(INSTALL_EXEC) -D $(PKG_FILES_DIR)/inadyn.init $(TARGET_sysconfdir)/init.d/inadyn $(UPDATE-RC.D) inadyn defaults 75 25 $(REMOVE)/$(INADYN_DIR) $(TOUCH) @@ -1144,9 +1144,9 @@ vsftpd: $(VSFTPD_DEPS) $(DL_DIR)/$(VSFTPD_SOURCE) | $(TARGET_DIR) $(MAKE) $(TARGET_CONFIGURE_ENV) LIBS="$($(PKG)_LIBS)"; \ $(INSTALL_EXEC) -D vsftpd $(TARGET_sbindir)/vsftpd mkdir -p $(TARGET_datadir)/empty - $(INSTALL_DATA) -D $(TARGET_FILES)/configs/vsftpd.conf $(TARGET_sysconfdir)/vsftpd.conf - $(INSTALL_DATA) -D $(TARGET_FILES)/configs/vsftpd.chroot_list $(TARGET_sysconfdir)/vsftpd.chroot_list - $(INSTALL_EXEC) -D $(TARGET_FILES)/scripts/vsftpd.init $(TARGET_sysconfdir)/init.d/vsftpd + $(INSTALL_DATA) -D $(PKG_FILES_DIR)/vsftpd.conf $(TARGET_sysconfdir)/vsftpd.conf + $(INSTALL_DATA) -D $(PKG_FILES_DIR)/vsftpd.chroot_list $(TARGET_sysconfdir)/vsftpd.chroot_list + $(INSTALL_EXEC) -D $(PKG_FILES_DIR)/vsftpd.init $(TARGET_sysconfdir)/init.d/vsftpd $(UPDATE-RC.D) vsftpd defaults 75 25 $(REMOVE)/$(PKG_DIR) $(TOUCH) @@ -1333,8 +1333,8 @@ samba33: $(SAMBA33_DEPS) $(DL_DIR)/$(SAMBA33_SOURCE) | $(TARGET_DIR) $(MAKE1) all; \ $(MAKE) install DESTDIR=$(TARGET_DIR) mkdir -p $(TARGET_localstatedir)/samba/locks - $(INSTALL_DATA) -D $(TARGET_FILES)/configs/smb3.conf $(TARGET_sysconfdir)/samba/smb.conf - $(INSTALL_EXEC) -D $(TARGET_FILES)/scripts/samba3.init $(TARGET_sysconfdir)/init.d/samba + $(INSTALL_DATA) -D $(PKG_FILES_DIR)/smb3.conf $(TARGET_sysconfdir)/samba/smb.conf + $(INSTALL_EXEC) -D $(PKG_FILES_DIR)/samba3.init $(TARGET_sysconfdir)/init.d/samba $(UPDATE-RC.D) samba defaults 75 25 rm -rf $(TARGET_bindir)/testparm rm -rf $(TARGET_bindir)/findsmb @@ -1403,8 +1403,8 @@ samba36: $(SAMBA36_DEPS) $(DL_DIR)/$(SAMBA36_SOURCE) | $(TARGET_DIR) $(MAKE); \ $(MAKE) install DESTDIR=$(TARGET_DIR) mkdir -p $(TARGET_localstatedir)/samba/locks - $(INSTALL_DATA) -D $(TARGET_FILES)/configs/smb3.conf $(TARGET_sysconfdir)/samba/smb.conf - $(INSTALL_EXEC) -D $(TARGET_FILES)/scripts/samba3.init $(TARGET_sysconfdir)/init.d/samba + $(INSTALL_DATA) -D $(PKG_FILES_DIR)/smb3.conf $(TARGET_sysconfdir)/samba/smb.conf + $(INSTALL_EXEC) -D $(PKG_FILES_DIR)/samba3.init $(TARGET_sysconfdir)/init.d/samba $(UPDATE-RC.D) samba defaults 75 25 rm -rf $(TARGET_bindir)/testparm rm -rf $(TARGET_bindir)/findsmb @@ -1455,7 +1455,7 @@ dropbear: $(DROPBEAR_DEPS) $(DL_DIR)/$(DROPBEAR_SOURCE) | $(TARGET_DIR) $(MAKE) $($(PKG)_MAKE_OPTS) SCPPROGRESS=1; \ $(MAKE) $($(PKG)_MAKE_OPTS) install DESTDIR=$(TARGET_DIR) mkdir -p $(TARGET_sysconfdir)/dropbear - $(INSTALL_EXEC) -D $(TARGET_FILES)/scripts/dropbear.init $(TARGET_sysconfdir)/init.d/dropbear + $(INSTALL_EXEC) -D $(PKG_FILES_DIR)/dropbear.init $(TARGET_sysconfdir)/init.d/dropbear $(UPDATE-RC.D) dropbear defaults 75 25 $(REMOVE)/$(PKG_DIR) $(TOUCH) @@ -1487,7 +1487,7 @@ sg3_utils: $(DL_DIR)/$(SG3_UTILS_SOURCE) | $(TARGET_DIR) $(INSTALL_EXEC) -D $(TARGET_bindir).$(@F)/$$bin $(TARGET_bindir)/$$bin; \ done rm -r $(TARGET_bindir).$(@F) - $(INSTALL_EXEC) -D $(TARGET_FILES)/scripts/sdX.init $(TARGET_sysconfdir)/init.d/sdX + $(INSTALL_EXEC) -D $(PKG_FILES_DIR)/sdX.init $(TARGET_sysconfdir)/init.d/sdX $(UPDATE-RC.D) sdX stop 97 0 6 . $(REWRITE_LIBTOOL) $(REMOVE)/$(PKG_DIR) @@ -1587,8 +1587,8 @@ wpa_supplicant: $(WPA_SUPPLICANT_DEPS) $(DL_DIR)/$(WPA_SUPPLICANT_SOURCE) | $(TA $(TARGET_CONFIGURE_ENV) \ $(MAKE); \ $(MAKE) install DESTDIR=$(TARGET_DIR) BINDIR=$(sbindir) - $(INSTALL_EXEC) -D $(TARGET_FILES)/scripts/pre-wlan0.sh $(TARGET_sysconfdir)/network/pre-wlan0.sh - $(INSTALL_EXEC) -D $(TARGET_FILES)/scripts/post-wlan0.sh $(TARGET_sysconfdir)/network/post-wlan0.sh + $(INSTALL_EXEC) -D $(PKG_FILES_DIR)/pre-wlan0.sh $(TARGET_sysconfdir)/network/pre-wlan0.sh + $(INSTALL_EXEC) -D $(PKG_FILES_DIR)/post-wlan0.sh $(TARGET_sysconfdir)/network/post-wlan0.sh $(REMOVE)/$(PKG_DIR) $(TOUCH) @@ -1670,7 +1670,7 @@ nfs-utils: $(NFS_UTILS_DEPS) $(DL_DIR)/$(NFS_UTILS_SOURCE) | $(TARGET_DIR) chmod 0755 $(TARGET_base_sbindir)/mount.nfs rm -f $(addprefix $(TARGET_base_sbindir)/,mount.nfs4 osd_login umount.nfs umount.nfs4) rm -f $(addprefix $(TARGET_sbindir)/,mountstats nfsiostat) - $(INSTALL_EXEC) -D $(TARGET_FILES)/scripts/nfsd.init $(TARGET_sysconfdir)/init.d/nfsd + $(INSTALL_EXEC) -D $(PKG_FILES_DIR)/nfsd.init $(TARGET_sysconfdir)/init.d/nfsd $(UPDATE-RC.D) nfsd defaults 75 25 $(REMOVE)/$(PKG_DIR) $(TOUCH) @@ -1729,7 +1729,7 @@ streamripper: $(STREAMRIPPER_DEPS) | $(TARGET_DIR) $(CONFIGURE); \ $(MAKE); \ $(INSTALL_EXEC) -D streamripper $(TARGET_bindir)/streamripper - $(INSTALL_EXEC) $(TARGET_FILES)/scripts/streamripper.sh $(TARGET_bindir)/ + $(INSTALL_EXEC) $(PKG_FILES_DIR)/streamripper.sh $(TARGET_bindir)/ $(REMOVE)/$(NI_STREAMRIPPER) $(TOUCH) @@ -1955,7 +1955,7 @@ minisatip: $(MINISATIP_DEPS) | $(TARGET_DIR) $(INSTALL_COPY) $(PKG_BUILD_DIR)/html $(TARGET_datadir)/minisatip $(INSTALL) -d $(TARGET_sysconfdir)/default echo 'MINISATIP_OPTS="-x 9090 -t -o /tmp/camd.socket"' > $(TARGET_sysconfdir)/default/minisatip - $(INSTALL_EXEC) -D $(TARGET_FILES)/scripts/minisatip.init $(TARGET_sysconfdir)/init.d/minisatip + $(INSTALL_EXEC) -D $(PKG_FILES_DIR)/minisatip.init $(TARGET_sysconfdir)/init.d/minisatip $(UPDATE-RC.D) minisatip defaults 75 25 $(REMOVE)/$(PKG_DIR) $(TOUCH) diff --git a/skel-root/general/scripts/djmount.init b/package/djmount/files/djmount.init similarity index 100% rename from skel-root/general/scripts/djmount.init rename to package/djmount/files/djmount.init diff --git a/skel-root/general/scripts/dropbear.init b/package/dropbear/files/dropbear.init similarity index 100% rename from skel-root/general/scripts/dropbear.init rename to package/dropbear/files/dropbear.init diff --git a/skel-root/general/configs/inadyn.conf b/package/inadyn/files/inadyn.conf similarity index 100% rename from skel-root/general/configs/inadyn.conf rename to package/inadyn/files/inadyn.conf diff --git a/skel-root/general/scripts/inadyn.init b/package/inadyn/files/inadyn.init similarity index 100% rename from skel-root/general/scripts/inadyn.init rename to package/inadyn/files/inadyn.init diff --git a/skel-root/general/scripts/minidlnad.init b/package/minidlna/files/minidlnad.init similarity index 100% rename from skel-root/general/scripts/minidlnad.init rename to package/minidlna/files/minidlnad.init diff --git a/skel-root/general/scripts/minisatip.init b/package/minisatip/files/minisatip.init similarity index 100% rename from skel-root/general/scripts/minisatip.init rename to package/minisatip/files/minisatip.init diff --git a/skel-root/general/scripts/start_neutrino.armbox b/package/neutrino/files/start_neutrino.armbox similarity index 100% rename from skel-root/general/scripts/start_neutrino.armbox rename to package/neutrino/files/start_neutrino.armbox diff --git a/skel-root/general/scripts/start_neutrino.coolstream b/package/neutrino/files/start_neutrino.coolstream similarity index 100% rename from skel-root/general/scripts/start_neutrino.coolstream rename to package/neutrino/files/start_neutrino.coolstream diff --git a/skel-root/general/scripts/nfsd.init b/package/nfs-utils/files/nfsd.init similarity index 100% rename from skel-root/general/scripts/nfsd.init rename to package/nfs-utils/files/nfsd.init diff --git a/skel-root/general/scripts/ntpdate.init b/package/ntp/files/ntpdate.init similarity index 100% rename from skel-root/general/scripts/ntpdate.init rename to package/ntp/files/ntpdate.init diff --git a/skel-root/general/scripts/samba3.init b/package/samba33/files/samba3.init similarity index 100% rename from skel-root/general/scripts/samba3.init rename to package/samba33/files/samba3.init diff --git a/skel-root/general/configs/smb3.conf b/package/samba33/files/smb3.conf similarity index 100% rename from skel-root/general/configs/smb3.conf rename to package/samba33/files/smb3.conf diff --git a/package/samba36/files/samba3.init b/package/samba36/files/samba3.init new file mode 100644 index 00000000..e96aaf02 --- /dev/null +++ b/package/samba36/files/samba3.init @@ -0,0 +1,43 @@ +#!/bin/sh + +. /etc/init.d/globals + +SMB_CONF=/etc/samba/smb.conf + +case "$1" in + start) + if [ -e /var/etc/.samba ]; then + grep -q "%%NETBIOS_NAME%%" $SMB_CONF + if [ $? -eq 0 ]; then + hwaddr=$(ifconfig eth0 | awk '/HWaddr/ { split($5,v,":"); print v[4] v[5] v[6] }') + sed -i "s|%%NETBIOS_NAME%%|NI-${hwaddr}|" $SMB_CONF + fi + mkdir -p /var/samba/locks + for i in smbd nmbd; do + printf "starting $i ..." + if pidof $i > /dev/null; then + echo " already running" + else + $i + echo "done" + fi + done + fi + ;; + stop) + if [ -e /var/etc/.samba ]; then + for i in nmbd smbd; do + printf "stopping $i ..." + if pidof $i > /dev/null; then + read pid < /var/run/${i}.pid + kill $pid && echo "done" || echo "failed!?" + else + echo "not running" + fi + done + fi + ;; + *) + echo "[$BASENAME] Usage: $0 {start|stop}" + ;; +esac diff --git a/package/samba36/files/smb3.conf b/package/samba36/files/smb3.conf new file mode 100644 index 00000000..25d4de43 --- /dev/null +++ b/package/samba36/files/smb3.conf @@ -0,0 +1,13 @@ +[global] +server string = NI-Samba-Server %v +# align workgroup and netbios name to your needs +workgroup = WORKGROUP +netbios name = %%NETBIOS_NAME%% +security = share +guest account = root +printcap name = /dev/null + +[public] +path = / +public = yes +writable = yes diff --git a/skel-root/general/scripts/sdX.init b/package/sg3_utils/files/sdX.init similarity index 100% rename from skel-root/general/scripts/sdX.init rename to package/sg3_utils/files/sdX.init diff --git a/skel-root/general/scripts/streamripper.sh b/package/streamripper/files/streamripper.sh similarity index 100% rename from skel-root/general/scripts/streamripper.sh rename to package/streamripper/files/streamripper.sh diff --git a/skel-root/general/configs/ushare.conf b/package/ushare/files/ushare.conf similarity index 100% rename from skel-root/general/configs/ushare.conf rename to package/ushare/files/ushare.conf diff --git a/skel-root/general/scripts/ushare.init b/package/ushare/files/ushare.init similarity index 100% rename from skel-root/general/scripts/ushare.init rename to package/ushare/files/ushare.init diff --git a/skel-root/general/configs/vsftpd.chroot_list b/package/vsftpd/files/vsftpd.chroot_list similarity index 100% rename from skel-root/general/configs/vsftpd.chroot_list rename to package/vsftpd/files/vsftpd.chroot_list diff --git a/skel-root/general/configs/vsftpd.conf b/package/vsftpd/files/vsftpd.conf similarity index 100% rename from skel-root/general/configs/vsftpd.conf rename to package/vsftpd/files/vsftpd.conf diff --git a/skel-root/general/scripts/vsftpd.init b/package/vsftpd/files/vsftpd.init similarity index 100% rename from skel-root/general/scripts/vsftpd.init rename to package/vsftpd/files/vsftpd.init diff --git a/skel-root/general/scripts/bp3flash.sh b/package/vuplus-platform-util/files/bp3flash.sh similarity index 100% rename from skel-root/general/scripts/bp3flash.sh rename to package/vuplus-platform-util/files/bp3flash.sh diff --git a/skel-root/general/scripts/vuplus-platform-util.init b/package/vuplus-platform-util/files/vuplus-platform-util.init similarity index 100% rename from skel-root/general/scripts/vuplus-platform-util.init rename to package/vuplus-platform-util/files/vuplus-platform-util.init diff --git a/skel-root/general/scripts/post-wlan0.sh b/package/wpa_supplicant/files/post-wlan0.sh similarity index 100% rename from skel-root/general/scripts/post-wlan0.sh rename to package/wpa_supplicant/files/post-wlan0.sh diff --git a/skel-root/general/scripts/pre-wlan0.sh b/package/wpa_supplicant/files/pre-wlan0.sh similarity index 100% rename from skel-root/general/scripts/pre-wlan0.sh rename to package/wpa_supplicant/files/pre-wlan0.sh