Small issue with overlayfs

On various Hardware and OS systems: pi / windows / routers / nas, etc

Moderator: leecollings

Post Reply
jannl
Posts: 673
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Geleen
Contact:

Small issue with overlayfs

Post by jannl »

I just activated the overlayfs with the wiki, everthing looks to work great.

When I issue a 'service saveoverlays sync', everything seems to go ok, however I get an error near the end of the script: '/etc/init.d/saveoverlays: 107: [: rw: unexpected operator'
Line 107 looks ok, so not sure what to do here.

Any clues?
hansrune
Posts: 49
Joined: Monday 07 October 2013 10:51
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Small issue with overlayfs

Post by hansrune »

Long time sine, but I think i fixed that. Please try downloading the service script again. Alternatively, try:
sudo bash -x /etc/init.d/saveoverlays sync
.... to debug more detailed.
jannl
Posts: 673
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Geleen
Contact:

Re: Small issue with overlayfs

Post by jannl »

thx, will try that later this week.

I downloaded the saveoverlays last saturday.
When I look at the file now, I see a space between #! and /bin/sh, which shouldn't be there I think (shebang line)

Furthermore, this should indicate /bin/sh is used instead of bash.

I will come back to this.
jannl
Posts: 673
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Geleen
Contact:

Re: Small issue with overlayfs

Post by jannl »

Issuing the command directly does not seem to give the error.

What presents the error is:

Code: Select all

sudo su -
mount -o remount,rw /
/etc/init.d/saveoverlays sync
mount -o remount,ro /
Error is in the saveoverlays
guiguid
Posts: 3
Joined: Tuesday 08 November 2016 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Small issue with overlayfs

Post by guiguid »

Same bug :

Code: Select all

pi@raspberrypi:/tmp $ sudo su -
root@raspberrypi:~# mount -o remount,rw /
root@raspberrypi:~# /etc/init.d/saveoverlays sync
[....] Syncing overlay filesystem sync: saveoverlays[info] Syncing /home to /home_org ....
[info] Syncing /var to /var_org ....
[info] Saving fake-hwclock.
[info] Sync changes to disk.
/etc/init.d/saveoverlays: 107: [: rw: unexpected operator
. ok 
root@raspberrypi:~# mount -o remount,ro /
root@raspberrypi:~# /etc/init.d/saveoverlays sync
[....] Syncing overlay filesystem sync: saveoverlays[info] Syncing /home to /home_org ....
[info] Syncing /var to /var_org ....
[info] Saving fake-hwclock.
[info] Sync changes to disk.
/etc/init.d/saveoverlays: 107: [: ro: unexpected operator
. ok 
root@raspberrypi:~# 
guiguid
Posts: 3
Joined: Tuesday 08 November 2016 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Small issue with overlayfs

Post by guiguid »

fixed by :

Code: Select all

-#!/bin/sh
+#/bin/bash
Have nice day
jannl
Posts: 673
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Geleen
Contact:

Re: Small issue with overlayfs

Post by jannl »

If that is the exact change, the line #/bin/bash does not do anything, because it is commented out.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest