Browse Source

Fix indentation in openwrt platform files.

Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
Toke Høiland-Jørgensen 8 năm trước cách đây
mục cha
commit
996a6375c0
2 tập tin đã thay đổi với 44 bổ sung44 xóa
  1. 7 7
      platform/openwrt/sqm-init
  2. 37 37
      src/run-openwrt.sh

+ 7 - 7
platform/openwrt/sqm-init

@@ -4,27 +4,27 @@ START=50
 
 reload()
 {
-/usr/lib/sqm/run.sh start
+    start
 }
 
 restart()
 {
-reload
+    reload
 }
 
 start()
 {
-reload
+    /usr/lib/sqm/run.sh start
 }
 
 stop()
 {
-/usr/lib/sqm/run.sh stop
+    /usr/lib/sqm/run.sh stop
 }
 
 boot()
 {
-# We are being run through hotplug scripts, don't do anything at boot
-logger -t SQM -s "sqm-scripts do nothing at boot, waiting for hotplug events."
-return 0
+    # We are being run through hotplug scripts, don't do anything at boot
+    logger -t SQM -s "sqm-scripts do nothing at boot, waiting for hotplug events."
+    return 0
 }

+ 37 - 37
src/run-openwrt.sh

@@ -29,43 +29,43 @@ fi
 config_load sqm
 
 run_sqm_scripts() {
-	local section="$1"
-	export IFACE=$(config_get "$section" interface)
-
-	[ -z "$RUN_IFACE" -o "$RUN_IFACE" = "$IFACE" ] || return
-
-	[ $(config_get "$section" enabled) -ne 1 ] && ACTION=stop
-
-	export UPLINK=$(config_get "$section" upload)
-	export DOWNLINK=$(config_get "$section" download)
-	export LLAM=$(config_get "$section" linklayer_adaptation_mechanism)
-	export LINKLAYER=$(config_get "$section" linklayer)
-	export OVERHEAD=$(config_get "$section" overhead)
-	export STAB_MTU=$(config_get "$section" tcMTU)
-	export STAB_TSIZE=$(config_get "$section" tcTSIZE)
-	export STAB_MPU=$(config_get "$section" tcMPU)
-	export ILIMIT=$(config_get "$section" ilimit)
-	export ELIMIT=$(config_get "$section" elimit)
-	export ITARGET=$(config_get "$section" itarget)
-	export ETARGET=$(config_get "$section" etarget)
-	export IECN=$(config_get "$section" ingress_ecn)
-	export EECN=$(config_get "$section" egress_ecn)
-	export IQDISC_OPTS=$(config_get "$section" iqdisc_opts)
-	export EQDISC_OPTS=$(config_get "$section" eqdisc_opts)
-	export TARGET=$(config_get "$section" target)
-	export SQUASH_DSCP=$(config_get "$section" squash_dscp)
-	export SQUASH_INGRESS=$(config_get "$section" squash_ingress)
-
-	export QDISC=$(config_get "$section" qdisc)
-	export SCRIPT=$(config_get "$section" script)
-
-	#sm: only stop-sqm if there is something running
-	CUR_STATE_FILE="${SQM_STATE_DIR}/${IFACE}.state"
-	if [ -f "${CUR_STATE_FILE}" ]; then
-	    "${SQM_LIB_DIR}/stop-sqm"
-	fi
-
-        [ "$ACTION" = "start" ] && "${SQM_LIB_DIR}/start-sqm"
+    local section="$1"
+    export IFACE=$(config_get "$section" interface)
+
+    [ -z "$RUN_IFACE" -o "$RUN_IFACE" = "$IFACE" ] || return
+
+    [ $(config_get "$section" enabled) -ne 1 ] && ACTION=stop
+
+    export UPLINK=$(config_get "$section" upload)
+    export DOWNLINK=$(config_get "$section" download)
+    export LLAM=$(config_get "$section" linklayer_adaptation_mechanism)
+    export LINKLAYER=$(config_get "$section" linklayer)
+    export OVERHEAD=$(config_get "$section" overhead)
+    export STAB_MTU=$(config_get "$section" tcMTU)
+    export STAB_TSIZE=$(config_get "$section" tcTSIZE)
+    export STAB_MPU=$(config_get "$section" tcMPU)
+    export ILIMIT=$(config_get "$section" ilimit)
+    export ELIMIT=$(config_get "$section" elimit)
+    export ITARGET=$(config_get "$section" itarget)
+    export ETARGET=$(config_get "$section" etarget)
+    export IECN=$(config_get "$section" ingress_ecn)
+    export EECN=$(config_get "$section" egress_ecn)
+    export IQDISC_OPTS=$(config_get "$section" iqdisc_opts)
+    export EQDISC_OPTS=$(config_get "$section" eqdisc_opts)
+    export TARGET=$(config_get "$section" target)
+    export SQUASH_DSCP=$(config_get "$section" squash_dscp)
+    export SQUASH_INGRESS=$(config_get "$section" squash_ingress)
+
+    export QDISC=$(config_get "$section" qdisc)
+    export SCRIPT=$(config_get "$section" script)
+
+    #sm: only stop-sqm if there is something running
+    CUR_STATE_FILE="${SQM_STATE_DIR}/${IFACE}.state"
+    if [ -f "${CUR_STATE_FILE}" ]; then
+	"${SQM_LIB_DIR}/stop-sqm"
+    fi
+
+    [ "$ACTION" = "start" ] && "${SQM_LIB_DIR}/start-sqm"
 }
 
 config_foreach run_sqm_scripts