comparison sbin/ftjail @ 655:5ba31e3748ca

ftjail: quote all option expansions
author Franz Glasner <fzglas.hg@dom66.de>
date Sat, 28 Sep 2024 14:51:25 +0200
parents 7bbb397168b7
children a8052a57a921
comparison
equal deleted inserted replaced
654:7bbb397168b7 655:5ba31e3748ca
77 77
78 local _ds_base _opt 78 local _ds_base _opt
79 79
80 _opt_dry_run="" 80 _opt_dry_run=""
81 while getopts "nu" _opt ; do 81 while getopts "nu" _opt ; do
82 case ${_opt} in 82 case "${_opt}" in
83 n|u) 83 n|u)
84 _opt_dry_run="yes" 84 _opt_dry_run="yes"
85 ;; 85 ;;
86 \?|:) 86 \?|:)
87 return 2; 87 return 2;
136 136
137 _opt_dry_run="" 137 _opt_dry_run=""
138 _opt_symlink="" 138 _opt_symlink=""
139 139
140 while getopts "LPnu" _opt ; do 140 while getopts "LPnu" _opt ; do
141 case ${_opt} in 141 case "${_opt}" in
142 L) 142 L)
143 _opt_symlink="yes" 143 _opt_symlink="yes"
144 ;; 144 ;;
145 P) 145 P)
146 _opt_symlink="no" 146 _opt_symlink="no"
241 local _ds_base _ds_skel _opt 241 local _ds_base _ds_skel _opt
242 242
243 _opt_symlink="" 243 _opt_symlink=""
244 244
245 while getopts "LP" _opt ; do 245 while getopts "LP" _opt ; do
246 case ${_opt} in 246 case "${_opt}" in
247 L) 247 L)
248 _opt_symlink="-L" 248 _opt_symlink="-L"
249 ;; 249 ;;
250 P) 250 P)
251 _opt_symlink="-P" 251 _opt_symlink="-P"
289 289
290 _opt_symlink="" 290 _opt_symlink=""
291 _opt_preserve_boot="" 291 _opt_preserve_boot=""
292 292
293 while getopts "LPb" _opt ; do 293 while getopts "LPb" _opt ; do
294 case ${_opt} in 294 case "${_opt}" in
295 L) 295 L)
296 _opt_symlink="yes" 296 _opt_symlink="yes"
297 ;; 297 ;;
298 P) 298 P)
299 _opt_symlink="no" 299 _opt_symlink="no"
481 481
482 _opt_dry_run="" 482 _opt_dry_run=""
483 _opt_symlink="" 483 _opt_symlink=""
484 484
485 while getopts "LPnu" _opt ; do 485 while getopts "LPnu" _opt ; do
486 case ${_opt} in 486 case "${_opt}" in
487 L) 487 L)
488 _opt_symlink="yes" 488 _opt_symlink="yes"
489 ;; 489 ;;
490 P) 490 P)
491 _opt_symlink="no" 491 _opt_symlink="no"
667 _opt_canmount="-o canmount=on" 667 _opt_canmount="-o canmount=on"
668 _opt_mountpoint="" 668 _opt_mountpoint=""
669 _opt_nodata="" 669 _opt_nodata=""
670 670
671 while getopts "ADLM:Pu" _opt ; do 671 while getopts "ADLM:Pu" _opt ; do
672 case ${_opt} in 672 case "${_opt}" in
673 A) 673 A)
674 _opt_canmount="-o canmount=noauto" 674 _opt_canmount="-o canmount=noauto"
675 ;; 675 ;;
676 D) 676 D)
677 _opt_nodata="yes" 677 _opt_nodata="yes"
878 local _add_log_sock 878 local _add_log_sock
879 879
880 _opt_keep="no" 880 _opt_keep="no"
881 _opt_old_origin="" 881 _opt_old_origin=""
882 while getopts "ko:" _opt ; do 882 while getopts "ko:" _opt ; do
883 case ${_opt} in 883 case "${_opt}" in
884 k) 884 k)
885 _opt_keep="yes" 885 _opt_keep="yes"
886 ;; 886 ;;
887 o) 887 o)
888 _opt_old_origin="$OPTARG" 888 _opt_old_origin="$OPTARG"
1095 1095
1096 # 1096 #
1097 # Global option handling 1097 # Global option handling
1098 # 1098 #
1099 while getopts "Vh" _opt ; do 1099 while getopts "Vh" _opt ; do
1100 case ${_opt} in 1100 case "${_opt}" in
1101 V) 1101 V)
1102 printf 'ftjail %s\n' '@@SIMPLEVERSIONSTR@@' 1102 printf 'ftjail %s\n' '@@SIMPLEVERSIONSTR@@'
1103 exit 0 1103 exit 0
1104 ;; 1104 ;;
1105 h) 1105 h)