File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ do_etherwake()
6565 local value=' '
6666 local password=' '
6767 local args=' '
68+ local section_name=' '
6869
6970 # password (legacy option)
7071 config_get value " ${section} " ' password'
@@ -77,17 +78,18 @@ do_etherwake()
7778 config_get value " ${section} " ' secureon'
7879 [ -n " ${value} " ] && append args " -p ${value} "
7980
81+ # name
82+ config_get section_name " ${section} " ' name'
83+ [ -z " ${section_name} " ] && section_name=" ${section} "
84+
8085 # mac address
8186 config_get value " ${section} " ' mac'
82- [ -z " ${value} " ] && { echo " ${initscript} : Target ${section} has no MAC address" ; return 1; }
87+ [ -z " ${value} " ] && {
88+ echo " Target '${section_name} ' has no 'mac' address" ; return 1; }
8389 append args " ${value} "
8490
85- # name
86- config_get value " ${section} " ' name'
87- [ -z " ${value} " ] && value=" {section}"
88-
8991 # execute command
90- echo " ${initscript} : Waking up ${value} via ${PROGRAM}${args: + ${args} } "
92+ echo " Waking up ' ${section_name} ' via ${PROGRAM}${args: + ${args} } "
9193 ${PROGRAM} ${args}
9294 return $?
9395}
You can’t perform that action at this time.
0 commit comments