Changeset 31973


Ignore:
Timestamp:
2012-05-29T03:47:52+02:00 (6 years ago)
Author:
jow
Message:

[packages] skels: use network.sh to find device names

File:
1 edited

Legend:

Unmodified
Added
Removed
  • packages/skels/files/package.init

    r9780 r31973  
    22# Sample init script reading its 
    33# configuration from /etc/config/package 
     4 
    45START=46 
    56STOP=46 
     
    78start_service() { 
    89        local section="$1" 
    9          
    10         include /lib/network 
    11         scan_interfaces 
    12         config_load /var/state/network 
    1310 
    14         config_get LAN lan ifname 
     11        . /lib/functions/network.sh 
     12 
     13        network_get_device LAN lan ifname 
    1514        config_get option1 "$section" option1 
    1615        config_get option2 "$section" option2 
     
    2221stop_service() { 
    2322        local section="$1" 
    24          
    25         include /lib/network 
    26         scan_interfaces 
    27         config_load /var/state/network 
    2823 
    29         config_get LAN lan ifname 
     24        . /lib/functions/network.sh 
     25 
     26        network_get_device LAN lan ifname 
    3027        config_get option1 "$section" option1 
    3128        config_get option2 "$section" option2 
     
    3835} 
    3936 
    40 stop () { 
     37stop() { 
    4138        config_load "package" 
    4239        config_foreach stop_service package 
Note: See TracChangeset for help on using the changeset viewer.