Fix VCHI initialization failed message for snmp raspberry extend
This commit is contained in:
@@ -4,6 +4,7 @@ seqDir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >>/dev/null 2>&1 && pwd )"
|
|||||||
toolName="snmpd"
|
toolName="snmpd"
|
||||||
toolConfigLoc="/etc/snmp"
|
toolConfigLoc="/etc/snmp"
|
||||||
toolConfig="${toolConfigLoc}/snmpd.conf"
|
toolConfig="${toolConfigLoc}/snmpd.conf"
|
||||||
|
toolSysUser="Debian-snmp"
|
||||||
|
|
||||||
|
|
||||||
step_1_info() { echo "Install packages for $toolName"; }
|
step_1_info() { echo "Install packages for $toolName"; }
|
||||||
@@ -102,15 +103,17 @@ step_20() {
|
|||||||
exe chmod +x "$rpiExtendLoc"
|
exe chmod +x "$rpiExtendLoc"
|
||||||
|
|
||||||
addConf -a "extend raspberry /etc/snmp/raspberry.sh" "$toolConfig"
|
addConf -a "extend raspberry /etc/snmp/raspberry.sh" "$toolConfig"
|
||||||
|
|
||||||
|
# VCHI initialization failed fix
|
||||||
|
exe usermod -aG video ${toolSysUser}
|
||||||
|
|
||||||
addConf -c "$rpiSudoersContent" "$rpiSudoersLoc"
|
addConf -c "$rpiSudoersContent" "$rpiSudoersLoc"
|
||||||
|
|
||||||
exe service snmpd restart
|
exe service snmpd restart
|
||||||
}
|
}
|
||||||
|
|
||||||
rpiExtendLoc="${toolConfigLoc}/raspberry.sh"
|
rpiExtendLoc="${toolConfigLoc}/raspberry.sh"
|
||||||
rpiSudoersLoc="/etc/sudoers.d/snmprpi"
|
rpiSudoersLoc="/etc/sudoers.d/snmprpi"
|
||||||
rpiSudoersContent="
|
rpiSudoersContent="${toolSysUser} ALL=(ALL) NOPASSWD: /etc/snmp/raspberry.sh, /usr/bin/vcgencmd*"
|
||||||
Debian-snmp ALL=(ALL) NOPASSWD: /etc/snmp/raspberry.sh, /usr/bin/vcgencmd*"
|
|
||||||
|
|
||||||
step_22_info() { echo "Extend $toolName with OS update availablity"; }
|
step_22_info() { echo "Extend $toolName with OS update availablity"; }
|
||||||
step_22_alias() { ALIAS="osupdate"; }
|
step_22_alias() { ALIAS="osupdate"; }
|
||||||
|
Reference in New Issue
Block a user