File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed
Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,6 @@ zfsbootmenu_essential_binaries=(
2020 " sed"
2121 " grep"
2222 " tail"
23- " tr"
2423 " tac"
2524 " blkid"
2625 " awk"
@@ -73,7 +72,8 @@ create_zbm_conf() {
7372 # Create core ZBM configuration file
7473
7574 local endian ival
76- ival=" $( echo -n 3 | od -tx2 -N2 -An | tr -d ' [:space:]' ) "
75+ ival=" $( echo -n 3 | od -tx2 -N2 -An ) "
76+ ival=" ${ival// [[:space:]]/ } "
7777 if [ " ${ival} " = " 3300" ]; then
7878 endian=" be"
7979 else
Original file line number Diff line number Diff line change @@ -118,7 +118,8 @@ get_spl_hostid() {
118118
119119 # Otherwise look to /etc/hostid, if possible
120120 if [ -r /etc/hostid ] && command -v od > /dev/null 2>&1 ; then
121- spl_hostid=" $( od -tx4 -N4 -An /etc/hostid 2> /dev/null | tr -d ' [:space:]' ) "
121+ spl_hostid=" $( od -tx4 -N4 -An /etc/hostid 2> /dev/null ) "
122+ spl_hostid=" ${spl_hostid// [[:space:]]/ } "
122123 if [ -n " ${spl_hostid} " ]; then
123124 zdebug " hostid from /etc/hostid: ${spl_hostid} "
124125 echo -n " 0x${spl_hostid} "
Original file line number Diff line number Diff line change @@ -404,7 +404,10 @@ snapshot_dispatcher() {
404404
405405 [ -n " ${user_input} " ] || return
406406
407- valid_name=$( echo " ${user_input} " | tr -c -d ' a-zA-Z0-9-_.:' )
407+ shopt -s extglob
408+ valid_name=" ${user_input// +([!a-zA-Z0-9-_.:])/ } "
409+ shopt -u extglob
410+
408411 if [[ " ${user_input} " != " ${valid_name} " ]]; then
409412 echo " ${user_input} is invalid, ${valid_name} can be used"
410413 pre_populated=" ${valid_name} "
You can’t perform that action at this time.
0 commit comments