Skip to content

Commit

Permalink
Fix opts, pass SUID option to wrapped binfmt script.
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos Hernandez committed May 14, 2017
1 parent caffd1e commit a34581f
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,19 @@ fi


if [[ $# -gt 0 ]]; then
while getopts ":r" opt; do
case $opt in
r)
options=$(getopt -o r -l remove -- "$@")
eval set -- "$options"
while true ; do
case "$1" in
-r|--remove)
unregister
;;
\?)
echo "Invalid option: -$OPTARG" >&2
*)
break
;;
esac
shift
done
else
exec /usr/sbin/qemu-binfmt-conf.sh
exec /usr/sbin/qemu-binfmt-conf.sh -c yes
fi

0 comments on commit a34581f

Please sign in to comment.