mirror of
https://github.com/brain-hackers/brain-config.git
synced 2025-01-03 10:00:07 +09:00
UART switch added to serial; GPIO server public access finished.
This commit is contained in:
parent
34a66bab0c
commit
8af52bed39
24
raspi-config
24
raspi-config
@ -742,6 +742,7 @@ do_serial() {
|
|||||||
fi
|
fi
|
||||||
sed -i /boot/cmdline.txt -e "s/console=ttyAMA0,[0-9]\+ //"
|
sed -i /boot/cmdline.txt -e "s/console=ttyAMA0,[0-9]\+ //"
|
||||||
sed -i /boot/cmdline.txt -e "s/console=serial0,[0-9]\+ //"
|
sed -i /boot/cmdline.txt -e "s/console=serial0,[0-9]\+ //"
|
||||||
|
set_config_var enable_uart 0 $CONFIG
|
||||||
if [ "$INTERACTIVE" = True ]; then
|
if [ "$INTERACTIVE" = True ]; then
|
||||||
whiptail --msgbox "Serial is now disabled" 20 60 1
|
whiptail --msgbox "Serial is now disabled" 20 60 1
|
||||||
fi
|
fi
|
||||||
@ -763,6 +764,7 @@ do_serial() {
|
|||||||
sed -i /boot/cmdline.txt -e "s/root=/console=ttyAMA0,115200 root=/"
|
sed -i /boot/cmdline.txt -e "s/root=/console=ttyAMA0,115200 root=/"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
set_config_var enable_uart 1 $CONFIG
|
||||||
if [ "$INTERACTIVE" = True ]; then
|
if [ "$INTERACTIVE" = True ]; then
|
||||||
whiptail --msgbox "Serial is now enabled" 20 60 1
|
whiptail --msgbox "Serial is now enabled" 20 60 1
|
||||||
fi
|
fi
|
||||||
@ -919,24 +921,24 @@ do_gpiosec() {
|
|||||||
fi
|
fi
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
case "$RET" in
|
case "$RET" in
|
||||||
Public)
|
|
||||||
echo "Setting insecure"
|
|
||||||
#rm -f /etc/systemd/system/dhcpcd.service.d/wait.conf
|
|
||||||
;;
|
|
||||||
Private)
|
Private)
|
||||||
echo "Setting secure"
|
rm -f /etc/systemd/system/pigpio.service.d/public.conf
|
||||||
#mkdir -p /etc/systemd/system/dhcpcd.service.d/
|
;;
|
||||||
#cat > /etc/systemd/system/dhcpcd.service.d/wait.conf << EOF
|
Public)
|
||||||
#[Service]
|
mkdir -p /etc/systemd/system/pigpio.service.d/
|
||||||
#ExecStart=
|
cat > /etc/systemd/system/pigpio.service.d/public.conf << EOF
|
||||||
#ExecStart=/sbin/dhcpcd -q -w
|
[Service]
|
||||||
#EOF
|
ExecStart=
|
||||||
|
ExecStart=/usr/bin/pigpiod
|
||||||
|
EOF
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
whiptail --msgbox "Programmer error, unrecognised option" 20 60 2
|
whiptail --msgbox "Programmer error, unrecognised option" 20 60 2
|
||||||
return 1
|
return 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
systemctl daemon-reload
|
||||||
|
systemctl restart pigpio
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user