Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenELEC-Amlogic.M8.arm-6.0.3.tar does not pick up custom remote.conf at start #153

Open
Teppopups opened this issue Jan 16, 2017 · 0 comments

Comments

@Teppopups
Copy link

Teppopups commented Jan 16, 2017

Hi,

Problem:

After upgrading the M8N from 5.0.3 to 6.0.3 (OpenELEC-Amlogic.M8.arm-6.0.3.tar) it stopped to load custom remote.conf file at start.

At the same time I can load it manually using:
/usr/bin/remotecfg /storage/.config/remote.conf

Cause:

I found that this is because of wrong configuration file /usr/lib/openelec/remote-config, which is loading by amlogic-remotecfg.service at start. It checks the standard built-in remote.conf file first and loads it, not even checking for custom one. It will never load custom remote.conf file as the standard file always exist.

...
if [ -f /etc/amremote/remote.conf ]; then
/usr/bin/remotecfg /etc/amremote/remote.conf
elif [ -f /storage/.config/remote.conf ]; then
/usr/bin/remotecfg /storage/.config/remote.conf
elif [ "$LSUSB_RET" = 0 ]; then
/usr/bin/remotecfg /etc/amremote/wetek.conf
elif [ "$LSUSB_RET" = 1 ]; then
/usr/bin/remotecfg /etc/amremote/openelec.conf
fi

Reference:
https://github.com/OpenELEC/OpenELEC.tv/blob/master/packages/sysutils/amremote/system.d/amlogic-remotecfg.service

Solution:

We need to modify the /usr/lib/openelec/remote-config, but the file system where it's located is Read-only, so we cannot do that directly.

We have to create another custom amlogic-remotecfg.service in /storage/.config/system.d (if I remember correctly), and point it to another custom remote-config in /storage/.config/ with correct command order along with your custom remote.conf file:

/storage/.config/system.d/amlogic-remotecfg.service:

[Unit]
Description=Amlogic IR remote support
[Service]
Type=oneshot
ExecStart=/storage/.config/remote-config
RemainAfterExit=yes
[Install]
WantedBy=basic.target

/storage/.config/remote-config

...
if [ -f /storage/.config/remote.conf ]; then
/usr/bin/remotecfg /storage/.config/remote.conf
elif [ -f /etc/amremote/remote.conf ]; then
/usr/bin/remotecfg /etc/amremote/remote.conf
elif [ "$LSUSB_RET" = 0 ]; then
/usr/bin/remotecfg /etc/amremote/wetek.conf
elif [ "$LSUSB_RET" = 1 ]; then
/usr/bin/remotecfg /etc/amremote/openelec.conf
fi

That's it.

@Teppopups Teppopups changed the title OpenELEC-Amlogic.M8.arm-6.0.3.tar does dot pick up custom remote.conf at start OpenELEC-Amlogic.M8.arm-6.0.3.tar does not pick up custom remote.conf at start Jan 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant