LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-06-2018, 12:16 PM   #16
MisterL
LQ Newbie
 
Registered: Mar 2018
Location: Germany
Distribution: Slackware
Posts: 13

Rep: Reputation: 7

Quote:
Originally Posted by compton View Post
Heres my /etc/rc.d/rc.local
Code:
  . /etc/rc.d/rc.pommed start
The dot is short for the "source" command, I think. So if rc.pommed exits with something else than 0 rc.local quits and doesn't even try to run the remaining script.
I've learned this recently, so maybe someone more experienced can correct me if I'm wrong.
Try to disable pommed, if you chmod the rc-file like stated in the comment in your rc.local this should suffice hence the if-statement.
 
Old 06-06-2018, 04:55 PM   #17
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 5,299

Rep: Reputation: 3044Reputation: 3044Reputation: 3044Reputation: 3044Reputation: 3044Reputation: 3044Reputation: 3044Reputation: 3044Reputation: 3044Reputation: 3044Reputation: 3044
Quote:
Originally Posted by compton View Post
Heres my /etc/rc.d/rc.local

Code:
#!/bin/sh
#
# /etc/rc.d/rc.local:  Local system initialization script.
#
# Put any local startup commands in here.  Also, if you have
# anything that needs to be run at shutdown time you can
# make an /etc/rc.d/rc.local_shutdown script and put those
# commands in there.
if [ -x /etc/rc.d/rc.rtirq ]; then
  /etc/rc.d/rc.rtirq start
fi
# To disable pommed, chmod rc.pommed to 644
if [ -x /etc/rc.d/rc.pommed ]; then
  . /etc/rc.d/rc.pommed start
fi
# Start MPD server
su flint /usr/bin/mpd
#if [ -x /etc/rc.d/rc.mpd ]; then
#  /etc/rc.d/rc.mpd start
#fi
/sbin/sysctl -w vm.swappiness=10
As MisterL stated, sourcing rc.pommed might be causing issues. Generally, you don't source rc. files, you want to execute them. I would remove the period in front of it as it is not common practice.

Next, I believe your su line is incorrect (not at a Linux box to check right now). If you want to run mpd as user "flint", I believe you need to specify the -c option with the command you want to run followed in quotes.

Code:
su flint -c "/usr/bin/mpd"
If you wanted to use the rc.mpd file, we'd need to see the contents of the file.
 
Old 06-07-2018, 12:34 AM   #18
compton
LQ Newbie
 
Registered: May 2018
Posts: 14

Original Poster
Rep: Reputation: Disabled
[SOLVED]

Thank you bassmadrigal, a thousand times over. My su command was ars about I should know not to blind cut and paste by now.

Quote:
Originally Posted by bassmadrigal
Code:
su flint -c "/usr/bin/mpd"
That did it. In rc.local. I see that my su command in rc.mpd was also back-to-front. However, after correcting rc.mpd, it still would not start automatically. Not to worry, I don't need one anyway



Quote:
Originally Posted by compton
Heres my /etc/rc.d/rc.local
Code:
. /etc/rc.d/rc.pommed start
Dunno how that period got there MisterL, but pommed still starts anyway.In fact, rc.pommed wouldn't start untill I called it from rc.local. I have gotten rid of the period though and it still works

Quote:
Originally Posted by bassmadrigal
If you wanted to use the rc.mpd file, we'd need to see the contents of the file.
It's in my first post, but I have done away with it entirely now. One line in rc.local does the trick. Thanks again.

I still have to wait 30 seconds or so for client(ncmpcpp) to connect to mpd, but mpd now starts automaticaly on boot. I am happy. Thank you all for sharring.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Slackware 14.2 - How to start mpd (Music Player Daemon) at boot time glupa4e Slackware 6 01-05-2017 02:20 AM
[SOLVED] Ubuntu Lucid + Kubuntu Desktop - Screen Saver won't auto start Bumpalot Ubuntu 0 05-31-2012 05:30 PM
MPD auto DB update - Can it be disabled? corrosivemisery Linux - Desktop 0 02-13-2012 04:24 PM
How do I auto start modules that aren't auto loaded on boot? darkbluedrew Debian 2 09-18-2005 09:10 AM
KDM won't auto-start after power failure ltb Linux - Newbie 1 03-16-2005 04:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration