From 040ee702138402c8f4fc2a62828393c0ff118b34 Mon Sep 17 00:00:00 2001 From: Francois B Date: Tue, 5 Jun 2018 10:05:04 +0200 Subject: [PATCH] Key-ID updated --- install_functions_ub1604.sh | 25 +++++++++++++++++-------- install_functions_ub1804.sh | 25 +++++++++++++++++-------- 2 files changed, 34 insertions(+), 16 deletions(-) diff --git a/install_functions_ub1604.sh b/install_functions_ub1604.sh index 36af055..77edb3e 100644 --- a/install_functions_ub1604.sh +++ b/install_functions_ub1604.sh @@ -556,15 +556,24 @@ function installTLPMenu () { installAppsFromListMenu tlp } -#TODO: +# +# Key-ID USB Fido U2F device udev rules +# function installKeyIDuDev () { - sudo sh -c "echo '# this udev file should be used with udev 188 and newer\n\ -ACTION!=\"add|change\", GOTO=\"u2f_end\"\n\ -\n\ -# Key-ID FIDO U2F\n\ -KERNEL==\"hidraw*\", SUBSYSTEM==\"hidraw\", ATTRS{idVendor}==\"096e\", ATTRS{idProduct}==\"0850|0880\", TAG+=\"uaccess\"\n\ -\n\ -LABEL=\"u2f_end\"' > /etc/udev/rules.d/70-u2f.rules" + printf "[CMD] Adding Key-ID device UDEV rules " + +cat << EOF | sudo tee /etc/udev/rules.d/70-u2f.rules +# this udev file should be used with udev 188 and newer\n\ +ACTION!="add|change", GOTO="u2f_end" + +# Key-ID FIDO U2F +KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="096e", ATTRS{idProduct}=="0850|0880", TAG+="uaccess" + +LABEL="u2f_end" +EOF + + ret_code=$? + retCode $ret_code runCmd "sudo service udev restart" \ "restarting UDEV service" diff --git a/install_functions_ub1804.sh b/install_functions_ub1804.sh index deff615..9ce53a0 100644 --- a/install_functions_ub1804.sh +++ b/install_functions_ub1804.sh @@ -524,15 +524,24 @@ function installTLPMenu () { installAppsFromListMenu tlp } -#TODO: +# +# Key-ID USB Fido U2F device udev rules +# function installKeyIDuDev () { - sudo sh -c "echo '# this udev file should be used with udev 188 and newer\n\ -ACTION!=\"add|change\", GOTO=\"u2f_end\"\n\ -\n\ -# Key-ID FIDO U2F\n\ -KERNEL==\"hidraw*\", SUBSYSTEM==\"hidraw\", ATTRS{idVendor}==\"096e\", ATTRS{idProduct}==\"0850|0880\", TAG+=\"uaccess\"\n\ -\n\ -LABEL=\"u2f_end\"' > /etc/udev/rules.d/70-u2f.rules" + printf "[CMD] Adding Key-ID device UDEV rules " + +cat << EOF | sudo tee /etc/udev/rules.d/70-u2f.rules +# this udev file should be used with udev 188 and newer\n\ +ACTION!="add|change", GOTO="u2f_end" + +# Key-ID FIDO U2F +KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="096e", ATTRS{idProduct}=="0850|0880", TAG+="uaccess" + +LABEL="u2f_end" +EOF + + ret_code=$? + retCode $ret_code runCmd "sudo service udev restart" \ "restarting UDEV service"