summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Reisner <d@falconindy.com>2011-06-07 01:33:20 +0200
committerDave Reisner <d@falconindy.com>2011-06-16 22:16:47 +0200
commit8594326ce24db6de841568c0ebcdbf203d4a885a (patch)
treebe65cda254e9349ee1c32312733ad73a0fb7ef76
parentfae6f29b149e343bd638e67f25a6a1001ca37fb0 (diff)
downloadmkinitcpio-8594326ce24db6de841568c0ebcdbf203d4a885a.tar.gz
mkinitcpio-8594326ce24db6de841568c0ebcdbf203d4a885a.tar.xz
mkinitcpio: remove cruft in getopts loop
We shouldn't guess at what the user does and doesn't want, but rather verify after parsing that what we have is sane. Also, remove the default case label, as this will never be met. Signed-off-by: Dave Reisner <d@falconindy.com>
-rwxr-xr-xmkinitcpio6
1 files changed, 0 insertions, 6 deletions
diff --git a/mkinitcpio b/mkinitcpio
index bbd066d..7169cb9 100755
--- a/mkinitcpio
+++ b/mkinitcpio
@@ -92,11 +92,6 @@ get_kernver() {
trap sighandler TERM INT
while getopts ':c:k:sb:g:p:m:vH:LMhS:' arg; do
- if [ "${OPTARG#-}" != "${OPTARG}" ]; then
- echo "error: optional argument to '-${arg}' begins with a '-'"
- echo " you probably don't want this....aborting."
- usage
- fi
case "${arg}" in
c) CONFIG="${OPTARG}" ;;
k) optkver=$OPTARG ;;
@@ -126,7 +121,6 @@ while getopts ':c:k:sb:g:p:m:vH:LMhS:' arg; do
M) SHOW_AUTOMODS=1 ;;
h|?) usage ;;
:) echo "${OPTARG} requires a value..."; usage ;;
- *) echo "invalid argument '${arg}'"; usage ;;
esac
done
shift $((${OPTIND} - 1))