mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
ice-client: set passwords via uci
This commit is contained in:
parent
62d773656c
commit
acc3be969d
1 changed files with 8 additions and 5 deletions
|
|
@ -1,11 +1,12 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
grep -rq "^ice:" /etc/passwd || {
|
grep -rq "^ice:" /etc/passwd || {
|
||||||
local password="$(db get hw.board.wpaKey)"
|
adduser -D -H -s /bin/false ice
|
||||||
if [ -n "$password" ]; then
|
uci -q delete passwords.ice
|
||||||
adduser -D -H -s /bin/false ice
|
uci -q set passwords.ice=usertype
|
||||||
(echo $password; sleep 1; echo $password) | passwd ice >/dev/null 2>&1
|
uci -q set passwords.ice.password="\$WPAKEY"
|
||||||
fi
|
uci -q add_list passwords.ice._access_r=root
|
||||||
|
uci -q commit passwords
|
||||||
}
|
}
|
||||||
|
|
||||||
uci show rpcd | grep username=.*ice.* >/dev/null || {
|
uci show rpcd | grep username=.*ice.* >/dev/null || {
|
||||||
|
|
@ -47,6 +48,7 @@ config login
|
||||||
list write 'juci-network-netifd'
|
list write 'juci-network-netifd'
|
||||||
list write 'juci-owsd'
|
list write 'juci-owsd'
|
||||||
list write 'juci-printer'
|
list write 'juci-printer'
|
||||||
|
list write 'juci-realtime-graphs'
|
||||||
list write 'juci-samba'
|
list write 'juci-samba'
|
||||||
list write 'juci-sfp'
|
list write 'juci-sfp'
|
||||||
list write 'juci-snmpd'
|
list write 'juci-snmpd'
|
||||||
|
|
@ -56,6 +58,7 @@ config login
|
||||||
list write 'juci-usb'
|
list write 'juci-usb'
|
||||||
list write 'core'
|
list write 'core'
|
||||||
list write 'unauthenticated'
|
list write 'unauthenticated'
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue