Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Config
Commits
80969587
Commit
80969587
authored
Aug 30, 2017
by
Igor Pecovnik
Browse files
Bugfixing, merging monitor and diagnostic
parent
dcabc18e
Changes
2
Hide whitespace changes
Inline
Side-by-side
debian-config-jobs
View file @
80969587
...
...
@@ -55,42 +55,35 @@ function jobs ()
#
"Monitor"
)
clear
exec
3>&1
monitor
=
$(
dialog
--print-maxsize
2>&1 1>&3
)
exec
3>&-
mon_x
=
$(
echo
$monitor
|
awk
'{print $2}'
|
sed
's/,//'
)
mon_y
=
$(
echo
$monitor
|
awk
'{print $3}'
|
sed
's/,//'
)
armbianmonitor
-m
| dialog
--no-shadow
--backtitle
"
$BACKTITLE
"
--title
"Simple CLI monitoring
$BOARD
"
--progressbox
$mon_x
$mon_y
armbianmonitor
echo
-e
"
\n
Type
\e
[92m
$0
\e
[0m to get back
\n
"
exit
;;
# Control board consumption
#
"Consumption"
)
clear
h3consumption
echo
-e
"
\n
Type
\e
[92m
$0
\e
[0m to get back
\n
"
exit
;;
# Send diagnostics
#
"Diagnostics"
)
clear
echo
""
armbianmonitor
-u
echo
""
read
-n
1
-s
-p
"Press any key to continue"
;;
# Board (fex) settings editor
#
"Fexedit"
)
exec
3>&1
monitor
=
$(
dialog
--print-maxsize
2>&1 1>&3
)
exec
3>&-
mon_x
=
$(
echo
$monitor
|
awk
'{print $2}'
|
sed
's/,//'
)
mon_y
=
$(
echo
$monitor
|
awk
'{print $3}'
|
sed
's/,//'
)
TEMP
=
$(
mktemp
-d
||
exit
1
)
trap
"rm -rf
\"
${
TEMP
}
\"
; exit 0"
0 1 2 3 15
bin2fex /boot/script.bin
${
TEMP
}
/tempfex.txt
>
/dev/null 2>&1
dialog
--title
"Edit u-boot environment"
\
--ok-label
"Save"
--no-collapse
--editbox
${
TEMP
}
/tempfex.txt
40
0 2>
${
TEMP
}
/tempfex.out
--ok-label
"Save"
--no-collapse
--editbox
${
TEMP
}
/tempfex.txt
$mon_y
0 2>
${
TEMP
}
/tempfex.out
[[
$?
=
0
]]
&&
fex2bin
${
TEMP
}
/tempfex.out /boot/script.bin
;;
...
...
@@ -228,18 +221,18 @@ function jobs ()
echo
"ctrl_interface=/var/run/hostapd"
>>
/etc/hostapd.conf
echo
"ctrl_interface_group=0"
>>
/etc/hostapd.conf
fi
CHECK
=
$(
systemctl daemon-reload
;
service hostapd stop
;
sleep
2
;
service hostapd start
;
service hostapd status|grep fail
)
CHECK
=
$(
systemctl daemon-reload
;
service hostapd stop
;
sleep
2
;
service hostapd start
;
sleep
2
;
service hostapd status|grep fail
)
# check n,a and ac modes
if
[[
-z
"
$CHECK
"
]]
;
then
dialog
--title
" Info "
--backtitle
"
$BACKTITLE
"
--no-collapse
--colors
--infobox
"
\n
Probing wireless 802.11n
\Z
1(150-300Mbps)
\Z
0"
5 43
sleep
2
sed
'/### IEEE 802.11n/,/^### IEEE 802.11n/ s/^# *//'
-i
/etc/hostapd.conf
CHECK
=
$(
systemctl daemon-reload
;
service hostapd stop
;
sleep
2
;
service hostapd start
;
service hostapd status|grep fail
)
CHECK
=
$(
systemctl daemon-reload
;
service hostapd stop
;
sleep
2
;
service hostapd start
;
sleep
2
;
service hostapd status|grep fail
)
if
[[
-z
"
$CHECK
"
]]
;
then
dialog
--title
" Info "
--backtitle
"
$BACKTITLE
"
--no-collapse
--colors
--infobox
"
\n
Probing wireless 802.11a
\Z
1(5Ghz)
\Z
0"
5 36
sleep
2
sed
'/### IEEE 802.11a\>/,/^### IEEE 802.11a\>/ s/^# *//'
-i
/etc/hostapd.conf
CHECK
=
$(
systemctl daemon-reload
;
service hostapd stop
;
sleep
2
;
service hostapd start
;
service hostapd status|grep fail
)
CHECK
=
$(
systemctl daemon-reload
;
service hostapd stop
;
sleep
2
;
service hostapd start
;
sleep
2
;
service hostapd status|grep fail
)
if
[[
-z
"
$CHECK
"
]]
;
then
dialog
--title
" Info "
--backtitle
"
$BACKTITLE
"
--no-collapse
--colors
--infobox
"
\n
Probing wireless 802.11ac
\Z
1(433Mbps x n @ 5Ghz)
\Z
0"
5 51
sleep
2
...
...
@@ -258,7 +251,7 @@ function jobs ()
sed
'/## IEEE 802.11n/,/^## IEEE 802.11n/ s/.*/#&/'
-i
/etc/hostapd.conf
fi
fi
CHECK
=
$(
systemctl daemon-reload
;
service hostapd stop
;
sleep
2
;
service hostapd start
;
service hostapd status|grep fail
)
CHECK
=
$(
systemctl daemon-reload
;
service hostapd stop
;
sleep
2
;
service hostapd start
;
sleep
2
;
service hostapd status|grep fail
)
if
[[
-n
"
$CHECK
"
]]
;
then
dialog
--backtitle
"
$BACKTITLE
"
--title
"Please wait"
\
--infobox
"
\n
Wireless adapter:
$WIRELESS_ADAPTER
\n\n
Probing Realtek hostapd driver compatibility."
7 50
...
...
debian-config-submenu
View file @
80969587
...
...
@@ -400,8 +400,7 @@ while true; do
#fi
[[
-f
/usr/bin/h3consumption
&&
"
$LINUXFAMILY
"
=
"sun8i"
&&
"
$BRANCH
"
=
"default"
]]
&&
\
LIST+
=(
"Consumption"
"Control board consumption"
)
[[
-f
/usr/bin/armbianmonitor
]]
&&
LIST+
=(
"Monitor"
"Simple CLI monitoring"
)
[[
-f
/usr/bin/armbianmonitor
]]
&&
LIST+
=(
"Diagnostics"
"Send diagnostics"
)
[[
-f
/usr/bin/armbianmonitor
]]
&&
LIST+
=(
"Monitor"
"Simple CLI board monitoring"
)
[[
-f
/usr/bin/bin2fex
&&
"
$LINUXFAMILY
"
=
sun
*
i
&&
"
$BRANCH
"
=
"default"
]]
&&
LIST+
=(
"Fexedit"
"Board (fex) settings editor"
)
if
[[
-n
$(
dpkg
-l
|
grep
linux-headers
)
]]
;
then
LIST+
=(
"Headers"
"Remove kernel headers"
)
;
else
LIST+
=(
"Headers"
"Install kernel headers"
)
;
fi
[[
-f
/usr/bin/h3disp
&&
"
$LINUXFAMILY
"
=
"sun8i"
&&
"
$BRANCH
"
=
"default"
&&
\
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment