Browse Source

make default mpdbox collection working out of the box

Waldemar Brodkorb 9 years ago
parent
commit
6222925ea1

+ 1 - 1
package/base-files/Makefile

@@ -6,7 +6,7 @@ include $(ADK_TOPDIR)/mk/rootfs.mk
 
 PKG_NAME:=		base-files
 PKG_VERSION:=		1.1
-PKG_RELEASE:=		2
+PKG_RELEASE:=		3
 PKG_SECTION:=		base/apps
 PKG_DESCR:=		basic files and scripts
 

+ 2 - 2
package/base-files/src/etc/init.d/fs

@@ -28,10 +28,10 @@ for fs in $fstypes; do
 		if [ $? -eq 0 ];then
 			[ -x /usr/sbin/fsck.$fs ] && {
 				logger -t 'Filesystem' "checking $fs filesystem on $disk"
-				fsck -p $disk >/dev/null
+				fsck -p $disk >/dev/null 2>&1
 			}
 			logger -t '' "Mounting local filesystems"
-			mount $disk
+			mount $disk >/dev/null 2>&1
 		else
 			logger -s -t 'Filesystem' "No $fs filesystem in kernel"
 		fi

+ 1 - 1
package/lighttpd/Makefile

@@ -150,9 +150,9 @@ post-install: ${INSTALL_MODS_y} ${INSTALL_MODS_m}
 	${INSTALL_DIR} $(IDIR_LIGHTTPD)/etc/lighttpd/conf.d
 	${INSTALL_DATA} ./files/lighttpd.conf $(IDIR_LIGHTTPD)/etc/lighttpd
 	${INSTALL_DATA} ./files/modules.conf $(IDIR_LIGHTTPD)/etc/lighttpd
-	${CP} ./files/conf.d $(IDIR_LIGHTTPD)/etc/lighttpd
 	${CP} ${WRKBUILD}/doc/config/conf.d/*.conf \
 		$(IDIR_LIGHTTPD)/etc/lighttpd/conf.d
+	${CP} ./files/conf.d $(IDIR_LIGHTTPD)/etc/lighttpd
 	${INSTALL_DIR} $(IDIR_LIGHTTPD)/usr/lib/lighttpd
 	for m in indexfile staticfile accesslog; do \
 		$(CP) $(WRKINST)/usr/lib/lighttpd/mod_$$m.so $(IDIR_LIGHTTPD)/usr/lib/lighttpd/ ; \

+ 1 - 1
package/lighttpd/files/modules.conf

@@ -129,7 +129,7 @@ server.modules = (
 ##
 ## FastCGI (mod_fastcgi)
 ##
-#include "conf.d/fastcgi.conf"
+include "conf.d/fastcgi.conf"
 
 ##
 ## plain old CGI (mod_cgi)

+ 3 - 2
package/mpd/Makefile

@@ -5,7 +5,7 @@ include ${ADK_TOPDIR}/rules.mk
 
 PKG_NAME:=		mpd
 PKG_VERSION:=		0.18.11
-PKG_RELEASE:=		3
+PKG_RELEASE:=		4
 PKG_MD5SUM:=		be23120f342250e8352f6499cb960fd2
 PKG_DESCR:=		music player daemon
 PKG_SECTION:=		mm/audio
@@ -254,7 +254,8 @@ CONFIGURE_ARGS+=	--disable-opus
 endif
 
 mpd-install:
-	${INSTALL_DIR} ${IDIR_MPD}/usr/bin ${IDIR_MPD}/etc/mpd/playlists
+	${INSTALL_DIR} ${IDIR_MPD}/etc
+	${INSTALL_DIR} ${IDIR_MPD}/usr/bin
 	${INSTALL_BIN} ${WRKINST}/usr/bin/mpd ${IDIR_MPD}/usr/bin
 	${INSTALL_DATA} ./files/mpd.conf ${IDIR_MPD}/etc/mpd.conf
 

+ 3 - 1
package/mpd/files/mpd.conf

@@ -1,7 +1,7 @@
 # An example configuration file for MPD
 user				"mpd"
 auto_update			"no"
-music_directory			"/music"
+music_directory			"/media/music"
 playlist_directory		"/data/mpd/playlists"
 state_file			"/data/mpd/state"
 db_file				"/data/mpd/database"
@@ -9,6 +9,8 @@ pid_file			"/var/run/mpd/mpd.pid"
 log_file			"syslog"
 filesystem_charset		"UTF-8"
 id3v1_encoding			"UTF-8"
+mixer_type                      "disabled"
+
 # An example of an ALSA output
 audio_output {
 	type			"alsa"

+ 3 - 2
package/mpd/files/mpd.init

@@ -14,12 +14,13 @@ autostart)
 start)
 	if [ ! -d /var/run/mpd ];then
 		mkdir -p /var/run/mpd
-		chown mpd:mpd /var/run/mpd
+		chown mpd:audio /var/run/mpd
 	fi
 	if [ ! -d /data/mpd ];then
 		mkdir -p /data/mpd
-		chown mpd:mpd /data/mpd
 	fi
+	touch /data/mpd/state
+	chown -R mpd:audio /data/mpd
 	mpd
 	;;
 stop)

+ 1 - 3
package/mpd/files/mpd.postinst

@@ -1,6 +1,4 @@
 #!/bin/sh
 . $IPKG_INSTROOT/etc/functions.sh
 add_rcconf mpd NO
-gid=$(get_next_gid)
-add_group mpd $gid
-add_user mpd $(get_next_uid) $gid /music
+add_user mpd $(get_next_uid) 7 /media/music

+ 1 - 1
package/php/files/php.init

@@ -1,5 +1,5 @@
 #!/bin/sh
-#PKG php-fastcgi
+#PKG php
 #INIT 80
 . /etc/rc.conf
 

+ 0 - 0
package/php/files/php-fastcgi.postinst → package/php/files/php.postinst


+ 1 - 1
scripts/update-rcconf

@@ -20,7 +20,7 @@ for service in $(grep ^ADK_RUNTIME_START_ $topdir/.config |grep -v ADK_RUNTIME_S
 	rcname=$(echo $rcname| sed -e "s#=y##")
 	rcname=$(echo $rcname| sed -e "s#^BUSYBOX_##")
 	rcname=$(echo $rcname| tr '[:upper:]' '[:lower:]')
-	if [ "$ADK_PKG_XBMCBOX" = "y" ];then
+	if [ "$ADK_PKG_XBMCBOX" = "y" -o "$ADK_PKG_MPDBOX" = "y" ];then
 		sed -i -e "s#$rcname=\"NO\"#$rcname=\"DAEMON\"#" $rcconf
 	else
 		sed -i -e "s#$rcname=\"NO\"#$rcname=\"YES\"#" $rcconf

+ 10 - 0
target/collections/mpdbox

@@ -52,6 +52,16 @@ config ADK_PKG_MPDBOX
 	select ADK_PACKAGE_E2FSCK
 	select ADK_PACKAGE_ALSA_UTILS
 	select ADK_PACKAGE_ALSA_UTILS_WITH_ALSAMIXER
+	select ADK_RUNTIME_START_SERVICES
+	select ADK_RUNTIME_START_DROPBEAR
+	select ADK_RUNTIME_START_BUSYBOX_NTPD
+	select ADK_RUNTIME_START_BUSYBOX_SYSLOGD
+	select ADK_RUNTIME_START_MPD
+	select ADK_RUNTIME_START_PHP
+	select ADK_RUNTIME_START_LIGHTTPD
+	select ADK_KERNEL_INPUT_KEYBOARD
+	select ADK_KERNEL_INPUT_MOUSE
+	select ADK_KERNEL_USB_HID
 	help
 	  Create a small mpdbox.