diff options
author | James Meyer <james.meyer@operamail.com> | 2011-10-20 15:31:52 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2011-10-20 15:31:52 (GMT) |
commit | 32491014a9d359ab4e6ab6c778472b8140e5ac02 (patch) | |
tree | 6b1db5b968469c5c994423172ff9004129283105 /abs/core/LinHES-config/install_functions.sh | |
parent | d9aad8b00a9f3fb60e456c0e528df90189acb5b3 (diff) | |
download | linhes_pkgbuild-32491014a9d359ab4e6ab6c778472b8140e5ac02.zip linhes_pkgbuild-32491014a9d359ab4e6ab6c778472b8140e5ac02.tar.gz linhes_pkgbuild-32491014a9d359ab4e6ab6c778472b8140e5ac02.tar.bz2 |
linhes-config: add support for remotes in the home dir.
install_functions: add the function in_kernel_support. The same change is also in the lircd runit script.
Diffstat (limited to 'abs/core/LinHES-config/install_functions.sh')
-rwxr-xr-x | abs/core/LinHES-config/install_functions.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/abs/core/LinHES-config/install_functions.sh b/abs/core/LinHES-config/install_functions.sh index 8f24835..3e70e79 100755 --- a/abs/core/LinHES-config/install_functions.sh +++ b/abs/core/LinHES-config/install_functions.sh @@ -309,7 +309,31 @@ function request_dhcp(){ } +function in_kernel_support() { + #lifted from mythbuntu + #For disabling other protocols, adjust to the new location in 2.6.37. 91 + if [ -d /sys/class/rc ] + then + for file in `find /sys/class/rc/*/ -name protocols` + do + if [ "$1" = "disable" ] + then + echo "lirc" > $file + else + echo "none" > $file + for protocol in `cat $file`; do + echo "+${protocol}" > $file + done + fi + done + fi +} + + + function init_remote { + mkdir -p /var/run/lirc + echo $CMDLINE | grep -q remoteport if [ $? -eq 0 ] then @@ -327,6 +351,7 @@ function init_remote { fi fi + in_kernel_support "disable" echo $CMDLINE | grep -q remote if [ $? -eq 0 ] |