Power & Source of Big Ideas

[Solved]How to start up a user script?

Moderators: chensy, FATechsupport

Even though I seem to be able to do the following in rc.local:

Code: Select all

rfkill block bluetooth


when I tried to put other commands like:

Code: Select all

mount -t vfat /dev/sda1 /mnt/USB_FLASHDRIVE


I got the following error:

Code: Select all

[FAILED] Failed to start /etc/rc.local Compatibility.                           
   See 'systemctl status rc-local.service' for details.


Well, after some Goggling it appears that modifying rc.local is NOT the current procedure.

In fact looking at the one executable statement, originally in this file:

Code: Select all

/usr/bin/init-wifi


and then looking at that file one sees that it does nothing!

In the previous distribution I was using (Pengutronix mini2440 BSP) I used a link in /etc/rc.d to a file in /etc/init.d called "startup".

Doing the command runlevel I get N 5. So, in rc5.d I tried putting a link called S99startup pointing to /etc/init.d/startup, but it doesn't execute.

So, my question is what is the acceptable procedure for starting up user scripts in Debian Jessie?
Well I found this https://www.debian-administration.org/article/28/Making_scripts_run_at_boot_time_with_Debian which appears to be out-of date.

Looking in /etc/init.d I find a file called skeleton, which looks like a template for writing user scripts.

If someone has a favourite tutorial specifically about the INIT INFO tags, that would be appreciated.

Thanks
The fundamental issue was I needed an entry in fstab before the mount command would work properly in /etc/rc.local

Problem solved.

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 102 on Mon Oct 08, 2018 12:42 pm

Users browsing this forum: No registered users and 1 guest