lantiq.sh 365 B

1234567891011121314151617
  1. #!/bin/sh
  2. lantiq_get_dt_led() {
  3. local label
  4. local ledpath
  5. local basepath="/sys/firmware/devicetree/base"
  6. local nodepath="$basepath/aliases/led-$1"
  7. [ -f "$nodepath" ] && ledpath=$(cat "$nodepath")
  8. [ -n "$ledpath" ] && label=$(cat "$basepath$ledpath/label")
  9. echo "$label"
  10. }
  11. lantiq_is_vdsl_system() {
  12. grep -qE "system type.*: (VR9|xRX200)" /proc/cpuinfo
  13. }