Changeset 25901


Ignore:
Timestamp:
2011-03-06T19:57:14+01:00 (5 years ago)
Author:
cshore
Message:

[net] miniupnpd: Added uci configuration option to set uuid. A uuid is automatically generated and added to the configuration file on the first boot of miniupnpd with no uuid. This closes: #6634. Current behaviour (non-unique UUID by way of no UUID being configured) can be obtained by using a uuid of 'nocli' (for no command line [uuid])

File:
1 edited

Legend:

Unmodified
Added
Removed
  • packages/net/miniupnpd/files/miniupnpd.init

    r25900 r25901  
    99        local extiface intiface upload download logging secure enabled natpmp 
    1010        local extip port usesysuptime conffile serial_number model_number 
     11        local uuid 
    1112 
    1213        config_get extiface config external_iface 
     
    2425        config_get serial_number config serial_number 
    2526        config_get model_number config model_number 
     27        config_get uuid config uuid 
    2628 
    2729        include /lib/network 
     
    6870                        append args "-m ${model_number}" 
    6971                         
     72                [ -z "$uuid" ] && { 
     73                        uuid="$(cat /proc/sys/kernel/random/uuid)" 
     74                        uci set upnpd.config.uuid=$uuid 
     75                        uci commit upnpd 
     76                } 
     77 
     78                [ "$uuid" = "nocli" ] || \ 
     79                        append args "-u $uuid" 
     80                 
    7081                # start firewall 
    7182                local zone 
Note: See TracChangeset for help on using the changeset viewer.