File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed
Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -692,15 +692,18 @@ case $yn in
692692 if $SUDO grep -q Raspberry /proc/cpuinfo; then
693693 # $SUDO setcap cap_net_raw+eip $(eval readlink -f `which node`) 2>&1 | $SUDO tee -a /var/log/nodered-install.log >>/dev/null
694694 $SUDO adduser $NODERED_USER gpio 2>&1 | $SUDO tee -a /var/log/nodered-install.log >> /dev/null
695+ FAM=$( cat /etc/issue | cut -d ' ' -f 1)
695696 ISS=$( cat /etc/issue | cut -d ' /' -f 2 | cut -d ' ' -f 2)
696- if (( $ISS > 11 )) ; then
697- echo " Replace old rpi.gpio with lgpio" | $SUDO tee -a /var/log/nodered-install.log >> /dev/null
698- $SUDO apt purge -y python3-rpi.gpio 2>&1 | $SUDO tee -a /var/log/nodered-install.log >> /dev/null
699- $SUDO apt install -y python3-pip 2>&1 | $SUDO tee -a /var/log/nodered-install.log >> /dev/null
700- $SUDO pip3 install --break-system-packages rpi-lgpio 2>&1 | $SUDO tee -a /var/log/nodered-install.log >> /dev/null
701- else
702- echo " Leaving old rpi.gpio" | $SUDO tee -a /var/log/nodered-install.log >> /dev/null
703- $SUDO apt install -y python3-rpi.gpio 2>&1 | $SUDO tee -a /var/log/nodered-install.log >> /dev/null
697+ if [[ " $FAM " == " Raspbian" ]]; then
698+ if (( $ISS > 11 )) ; then
699+ echo " Replace old rpi.gpio with lgpio" | $SUDO tee -a /var/log/nodered-install.log >> /dev/null
700+ $SUDO apt purge -y python3-rpi.gpio 2>&1 | $SUDO tee -a /var/log/nodered-install.log >> /dev/null
701+ $SUDO apt install -y python3-pip 2>&1 | $SUDO tee -a /var/log/nodered-install.log >> /dev/null
702+ $SUDO pip3 install --break-system-packages rpi-lgpio 2>&1 | $SUDO tee -a /var/log/nodered-install.log >> /dev/null
703+ else
704+ echo " Leaving old rpi.gpio" | $SUDO tee -a /var/log/nodered-install.log >> /dev/null
705+ $SUDO apt install -y python3-rpi.gpio 2>&1 | $SUDO tee -a /var/log/nodered-install.log >> /dev/null
706+ fi
704707 fi
705708 fi
706709 $SUDO setcap cap_net_raw=ep /bin/ping 2>&1 | $SUDO tee -a /var/log/nodered-install.log >> /dev/null
You can’t perform that action at this time.
0 commit comments