I'm seeing the same thing and came here to Answers to see if anyone else has run into this:
If I run
./splunk enable boot-start -user splunk
on a Scientific Linux machine with Splunk 6.0.3 installed, the command works as expected, creating a splunk script in /etc/init.d that does an su to the splunk user:
splunk_start() {
echo Starting Splunk...
/bin/su - splunk -c "\"/opt/splunk/bin/splunk\" start --no-prompt --answer-yes"
RETVAL=$?
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/splunk
}
If I do the same thing on a different Scientific Linux machine with Splunk 6.1.1 installed, the /etc/init.d/splunk script gets created, but the su - splunk switch to the splunk user is not added. It's as if the enable boot-start command was run without the -user flag.
splunk_start() {
echo Starting Splunk...
"/opt/splunk/bin/splunk" start --no-prompt --answer-yes
RETVAL=$?
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/splunk
}
If I run
chkconfig --list | grep splunk
it returns the same results on both servers:
splunk 0:off 1:off 2:on 3:on 4:on 5:on 6:off
splunk 0:off 1:off 2:on 3:on 4:on 5:on 6:off
I'm running both commands as root from within $SPLUNK_HOME/bin. These are different servers, of course, and the environments are not identical. Both are 64 bit SL:
Splunk 6.0.3: Linux somosomo 2.6.32-220.4.1.el6.x86_64 #1 SMP Mon Jan 23 17:20:44 CST 2012 x86_64 x86_64 x86_64 GNU/Linux
Splunk 6.1.1: Linux SL64X86X64-00 2.6.32-358.el6.x86_64 #1 SMP Fri Feb 22 20:37:17 CST 2013 x86_64 x86_64 x86_64 GNU/Linux
I'm setting up another server to test with now, but this is feeling like a 6.1 (or 6.1.1) issue.
... View more