]> git.pld-linux.org Git - packages/mpd.git/commitdiff
- add sysconfig (for tuning nice level)
authorElan Ruusamäe <glen@pld-linux.org>
Sun, 3 Apr 2011 11:20:14 +0000 (11:20 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    mpd.init -> 1.4
    mpd.spec -> 1.62
    mpd.sysconfig -> 1.1

mpd.init
mpd.spec
mpd.sysconfig [new file with mode: 0644]

index 6397003bb898b4b16a2ef7f87355331b83aea8e9..63a89a2a8f52e842935291549bbdf0c081ed20ca 100644 (file)
--- a/mpd.init
+++ b/mpd.init
 # Source function library
 . /etc/rc.d/init.d/functions
 
+MPD_OPTIONS=""
+
+# Get service config - may override defaults
+[ -f /etc/sysconfig/mpd ] && . /etc/sysconfig/mpd
+
 start() {
        # Check if the service is already running?
        if [ -f /var/lock/subsys/mpd ]; then
@@ -19,7 +24,6 @@ start() {
        fi
 
        msg_starting "Music Player Daemon"
-       OPTIONS=""
        daemon /usr/bin/mpd
        RETVAL=$?
        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/mpd
index 90fedde4f3db2791d60042e44c697ba7bb9a5e8c..d6466002bdab7e4e971e208e04cd167480f3c7b5 100644 (file)
--- a/mpd.spec
+++ b/mpd.spec
@@ -4,19 +4,20 @@
 # Conditional build:
 %bcond_without mod             # enable MOD support
 %bcond_without pulseaudio      # disable PulseAudio support
-#
+
 Summary:       Music Player Daemon
 Summary(hu.UTF-8):     Music Player Daemon
 Summary(pl.UTF-8):     Music Player Daemon - demon odtwarzający muzykę
 Name:          mpd
 Version:       0.16.2
-Release:       1
+Release:       2
 License:       GPL v2+
 Group:         Applications/Multimedia
 Source0:       http://downloads.sourceforge.net/musicpd/%{name}-%{version}.tar.bz2
 # Source0-md5: dedb75cef8e489f3de5231031876fb77
 Source1:       %{name}.conf
 Source2:       %{name}.init
+Source3:       %{name}.sysconfig
 URL:           http://www.musicpd.org/
 BuildRequires: OpenAL-devel
 BuildRequires: alsa-lib-devel >= 0.9.0
@@ -130,14 +131,15 @@ frontendów albo często restartujących X.
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/rc.d/init.d} \
+install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig}} \
        $RPM_BUILD_ROOT{/var/lib/mpd/playlists,/var/log/mpd,/var/run/mpd}
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
-install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
-install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mpd
+cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
+install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mpd
+cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/mpd
 
 touch $RPM_BUILD_ROOT/var/lib/mpd/mpd.db
 touch $RPM_BUILD_ROOT/var/lib/mpd/mpdstate
@@ -181,6 +183,7 @@ fi
 %attr(755,root,root) %{_bindir}/*
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mpd.conf
 %attr(754,root,root) /etc/rc.d/init.d/mpd
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mpd
 %dir %attr(770,root,mpd) /var/lib/%{name}
 %dir %attr(770,root,mpd) /var/lib/%{name}/playlists
 %dir %attr(751,root,root) /var/log/%{name}
diff --git a/mpd.sysconfig b/mpd.sysconfig
new file mode 100644 (file)
index 0000000..d926c0f
--- /dev/null
@@ -0,0 +1,4 @@
+# Nice level for mpd
+SERVICE_RUN_NICE_LEVEL="+0"
+
+#MPD_OPTIONS=""
This page took 0.063618 seconds and 4 git commands to generate.