Have you tried to add #!/bin/bash in the file and creating a link to rc5. with a high number?
ln -s /etc/init.d/pinsetup.sh /etc/rc5.d/S98pinsetup.sh
I will try the same and will let you know the outcome
You can add a service like in this other thread ; How do I run a script on startup on Edison?
Are yo using the last release?
I tried both of these suggestions, but it still doesn't set correctly after a reboot.
I don't even think adding #!/bin/bash will run the file from the shell anymore (and I think it's because of the busybox implementation). Did you try your suggestions? I'm using the WW05-15 release. I have a bunch of services running correctly already, but this is a configuration not a daemon and I'd like to know the correct way to set it.
1 of 1 people found this helpful
I used this code in /etc/init.d/pin.sh:
#!/bin/sh echo mode0 > /sys/kernel/debug/gpio_debug/gpio110/current_pinmux
root@edison:~# chmod 755 /etc/init.d/pin.sh root@edison:~# update-rc.d pin.sh defaults root@edison:~# ln -s /etc/init.d/pin.sh /etc/rc5.d/S98pin.sh root@edison:~# ln -s /etc/init.d/pin.sh /etc/rc4.d/S98pin.sh root@edison:~# ln -s /etc/init.d/pin.sh /etc/rc3.d/S98pin.sh root@edison:~# ln -s /etc/init.d/pin.sh /etc/rc2.d/S98pin.sh
I ran reboot at I had mode0 after cat /sys/kernel/debug/gpio_debug/gpio110/current_pinmux
Let me know if works for you too.
yes, writing to all the rcN.d directories did work. I didn't go one by one, so I can't point to which in particular, I just know that just writing to rc5.d does not solve it. When I am bringing up a clean install I will provide which one does the trick.
Just write a systemd unit file for this. Arch linux has very good documentation on how the basics work - https://wiki.archlinux.org/index.php/Systemd#Writing_unit_files
Using the old rc/sysV style scripts on a systemd box is horrible, you miht get a way with it if the compat layer is there (I wouldn't have thought on edison images it would be there). Those runleves CMata_Intel pointed you to are not used in a systemd poky build that's why /etc/inittab doesn't exist on the edison FS!