Changeset 35664


Ignore:
Timestamp:
2013-02-18T11:38:05+01:00 (5 years ago)
Author:
florian
Message:

x86/rdc: migrate to common led helper functions

Signed-off-by: Michael Heimpold <mhei@…>
Signed-off-by: Florian Fainelli <florian@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/x86/rdc/base-files/etc/diag.sh

    r33779 r35664  
    11#!/bin/sh 
    2 # Copyright (C) 2007 OpenWrt.org 
     2# Copyright (C) 2007-2013 OpenWrt.org 
    33 
    4 set_led() { 
    5         local led="$1" 
    6         local state="$2" 
    7         [ -d "/sys/class/leds/rdc321x:$led" ] && echo "$state" > "/sys/class/leds/rdc321x:$led/brightness" 
    8 } 
     4. /lib/functions/leds.sh 
     5 
     6status_led="rdc321x:dmz" 
    97 
    108set_state() { 
    119        case "$1" in 
    12                 preinit) 
    13                         set_led dmz 1 
     10        preinit) 
     11                status_led_on 
    1412                ;; 
    15                 done) 
    16                         set_led dmz 0 
     13        done) 
     14                status_led_off 
    1715                ;; 
    1816        esac 
Note: See TracChangeset for help on using the changeset viewer.