nikohal2015
Posts: 7
Joined: Sat Jul 04, 2015 6:32 pm

rc.local error

Thu Nov 05, 2015 9:56 pm

Hi,
I use rasbian. And the problem is ups not start up or when power going down, it's shutdown. Accu is full. And when it's boot it give error rc.local file. Error: "Failed to start /etc/init.d/rc.local Compatibility.
See 'systemctl status rc-local.service' for details.

So I try to fix it with this way: https://bbs.archlinux.org/viewtopic.php?id=147790
But no help.

Here is rc.local file content:

# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
printf "My IP address is %s\n" "$_IP"
fi

# Run UPS Pico FSSD script and load the included emulated RTC
sudo python /home/pi/picofssd.py &

echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-1/new_device
( sleep 4; hwclock -s ) &

exit 0

gordon77
Posts: 5077
Joined: Sun Aug 05, 2012 3:12 pm

Re: rc.local error

Thu Nov 05, 2015 10:21 pm

I think the problem is with Jessie you can't set the rtc in rc.local

See viewtopic.php?f=66&t=85683&p=838067#p838067

User avatar
rpdom
Posts: 17275
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: rc.local error

Fri Nov 06, 2015 6:45 am

You don't need sudo in rc.local as it is run by the root user anyway.

fruit-uk
Posts: 609
Joined: Wed Aug 06, 2014 4:19 pm
Location: Suffolk, UK

Re: rc.local error

Fri Nov 06, 2015 7:45 am

gordon77 wrote:I think the problem is with Jessie you can't set the rtc in rc.local

See viewtopic.php?f=66&t=85683&p=838067#p838067
There is a more concise one at viewtopic.php?f=66&t=125003

There may be other RTC (at least) issues if upgrading.
Many wheezy RTC methods involved editing /etc/init.d/hwclock.sh and /etc/default/hwclock in various ways
Upgrades will not usually overwrite user-modified files (a dialogue is often presented when this occurs) so it is worth checking wheher you still have those wheezy modified files in those positions

Edit:
I have no idea how dist-upgrade copes with this, I always do a fresh install, keeping a copy of my old stuff of course, when doing a major upgrade

Return to “Troubleshooting”