Commit patch for bug #139866 by Martin Parm.
[genkernel.git] / gen_cmdline.sh
1 #!/bin/bash
2
3 longusage() {
4   echo "Gentoo Linux Genkernel ${GK_V}"
5   echo "Usage: "
6   echo "  genkernel [options] action"
7   echo
8   echo "Available Actions: "
9   echo "  all                           Build all steps"
10   echo "  bzImage                       Build only the kernel"
11   echo "  kernel                        Build only the kernel and modules"
12   echo "  initrd                        Build only the initrd"
13   echo
14   echo "Available Options: "
15   echo "  Debug settings"
16   echo "        --debuglevel=<0-5>      Debug Verbosity Level"
17   echo "        --debugfile=<outfile>   Output file for debug info"
18   echo "        --color                 Output debug in color"
19   echo "        --no-color              Do not output debug in color"
20   echo "  Kernel Configuration settings"
21   echo "        --menuconfig            Run menuconfig after oldconfig"
22   echo "        --no-menuconfig         Do not run menuconfig after oldconfig"
23   echo "        --gconfig               Run gconfig after oldconfig"
24   echo "        --xconfig               Run xconfig after oldconfig"
25   echo "        --save-config           Save the configuration to /etc/kernels"
26   echo "        --no-save-config        Don't save the configuration to /etc/kernels"
27   echo "  Kernel Compile settings"
28   echo "        --clean                 Run make clean before compilation"
29   echo "        --mrproper              Run make mrproper before compilation"
30   echo "        --no-clean              Do not run make clean before compilation"
31   echo "        --no-mrproper           Do not run make mrproper before compilation"
32   echo "        --oldconfig             Implies --no-clean and runs a 'make oldconfig'"
33   echo "        --bootsplash            Install bootsplash support to the initrd"
34   echo "        --no-bootsplash         Do not use bootsplash"
35   echo "        --gensplash             Install gensplash support into bzImage"
36   echo "        --no-gensplash          Do not use gensplash"
37   echo "        --install               Install the kernel after building"
38   echo "        --no-install            Do not install the kernel after building"
39   echo "        --no-initrdmodules      Don't copy any modules to the initrd"
40   echo "        --no-udev               Disable udev support"
41   echo "        --no-devfs              Disable devfs support"
42   echo "        --callback=<...>        Run the specified arguments after the"
43   echo "                                kernel and modules have been compiled"
44   echo "        --static                Build a static (monolithic kernel)."
45   echo "        --initramfs             Builds initramfs before kernel and embeds it"
46   echo "                                into the kernel."
47   echo "  Kernel settings"
48   echo "        --kerneldir=<dir>       Location of the kernel sources"
49   echo "        --kernel-config=<file>  Kernel configuration file to use for compilation"
50   echo "        --module-prefix=<dir>   Prefix to kernel module destination, modules"
51   echo "                                will be installed in <prefix>/lib/modules"
52   echo "  Low-Level Compile settings"
53   echo "        --kernel-cc=<compiler>  Compiler to use for kernel (e.g. distcc)"
54   echo "        --kernel-as=<assembler> Assembler to use for kernel"
55   echo "        --kernel-ld=<linker>    Linker to use for kernel"
56   echo "        --kernel-cross-compile=<cross var> CROSS_COMPILE kernel variable"
57   echo "        --kernel-make=<makeprg> GNU Make to use for kernel"
58   echo "        --utils-cc=<compiler>   Compiler to use for utilities"
59   echo "        --utils-as=<assembler>  Assembler to use for utils"
60   echo "        --utils-ld=<linker>     Linker to use for utils"
61   echo "        --utils-make=<makeprog> GNU Make to use for utils"
62   echo "        --utils-cross-compile=<cross var> CROSS_COMPILE utils variable"
63   echo "        --utils-arch=<arch>     Force to arch for utils only instead of"
64   echo "                                autodetect."
65   echo "        --makeopts=<makeopts>   Make options such as -j2, etc..."
66   echo "        --mountboot             Mount BOOTDIR automatically if mountable"
67   echo "        --no-mountboot          Don't mount BOOTDIR automatically"  
68   echo "        --bootdir=<dir>         Set the location of the boot-directory, default is /boot"
69   echo "  Initialization"
70   echo "        --bootsplash=<theme>    Force bootsplash using <theme>"
71   echo "        --gensplash=<theme>     Force gensplash using <theme>"
72   echo "        --gensplash-res=<res>   Select gensplash resolutions"
73   echo "        --do-keymap-auto        Forces keymap selection at boot"
74   echo "        --evms2                 Include EVMS2 support"
75   echo "                                --> 'emerge evms' in the host operating system"
76   echo "                                first"
77   echo "        --lvm2                  Include LVM2 support"
78 #  echo "       --unionfs               Include UNIONFS support"
79   echo "        --dmraid                Include DMRAID support"
80   echo "        --slowusb               Enables extra pauses for slow USB CD boots"
81   echo "        --bootloader=grub       Add new kernel to GRUB configuration"
82   echo "        --linuxrc=<file>        Specifies a user created linuxrc"
83   echo "        --disklabel             Include disk label and uuid support in your"
84   echo "                                initrd"
85   echo "        --luks                  Include LUKS support"
86   echo "                                --> 'emerge cryptsetup-luks' with USE=-dynamic"
87   echo "  Internals"
88   echo "        --arch-override=<arch>  Force to arch instead of autodetect"
89   echo "        --cachedir=<dir>        Override the default cache location"
90   echo "        --tempdir=<dir>         Location of Genkernel's temporary directory"
91   echo "        --postclear             Clear all tmp files and caches after genkernel has run"
92   echo "  Output Settings"
93   echo "        --kernname=<...>        Tag the kernel and initrd with a name:"
94   echo "                                If not defined the option defaults to"
95   echo "                                'genkernel'"
96   echo "        --minkernpackage=<tbz2> File to output a .tar.bz2'd kernel and initrd:"
97   echo "                                No modules outside of the initrd will be"
98   echo "                                included..."
99   echo "        --modulespackage=<tbz2> File to output a .tar.bz2'd modules after the"
100   echo "                                callbacks have run"
101   echo "        --kerncache=<tbz2>      File to output a .tar.bz2'd kernel contents"
102   echo "                                of /lib/modules/ and the kernel config"
103   echo "                                NOTE: This is created before the callbacks"
104   echo "                                are run!"
105   echo "        --no-kernel-sources     This option is only valid if kerncache is"
106   echo "                                defined. If there is a valid kerncache no checks"
107   echo "                                will be made against a kernel source tree"
108   echo "        --initramfs-overlay=<dir>"
109   echo "                                Directory structure to include in the initramfs,"
110   echo "                                only available on 2.6 kernels that do not use"
111   echo "                                bootsplash"
112 }
113
114 usage() {
115   echo "Gentoo Linux Genkernel ${GK_V}"
116   echo "Usage: "
117   echo "        genkernel [options] all"
118   echo
119   echo 'Some useful options:'
120   echo '        --menuconfig            Run menuconfig after oldconfig'
121   echo '        --no-clean              Do not run make clean before compilation'
122   echo '        --no-mrproper           Do not run make mrproper before compilation,'
123   echo '                                this is implied by --no-clean.'
124   echo
125   echo 'For a detailed list of supported options and flags; issue:'
126   echo '        genkernel --help'
127 }
128
129 parse_opt() {
130         case "$1" in
131                 *\=*)
132                         echo "$1" | cut -f2- -d=
133                 ;;
134         esac
135 }
136
137 parse_cmdline() {
138         case "$*" in
139               --kernel-cc=*)
140                       CMD_KERNEL_CC=`parse_opt "$*"`
141                       print_info 2 "CMD_KERNEL_CC: $CMD_KERNEL_CC"
142               ;;
143               --kernel-ld=*)
144                       CMD_KERNEL_LD=`parse_opt "$*"`
145                       print_info 2 "CMD_KERNEL_LD: $CMD_KERNEL_LD"
146               ;;
147               --kernel-as=*)
148                       CMD_KERNEL_AS=`parse_opt "$*"`
149                       print_info 2 "CMD_KERNEL_AS: $CMD_KERNEL_AS"
150               ;;
151               --kernel-make=*)
152                       CMD_KERNEL_MAKE=`parse_opt "$*"`
153                       print_info 2 "CMD_KERNEL_MAKE: $CMD_KERNEL_MAKE"
154               ;;
155               --kernel-cross-compile=*)
156                       CMD_KERNEL_CROSS_COMPILE=`parse_opt "$*"`
157                       CMD_KERNEL_CROSS_COMPILE=$(echo ${CMD_KERNEL_CROSS_COMPILE}|sed -e 's/.*[^-]$/&-/g')
158                       print_info 2 "CMD_KERNEL_CROSS_COMPILE: $CMD_KERNEL_CROSS_COMPILE"
159               ;;
160               --utils-cc=*)
161                       CMD_UTILS_CC=`parse_opt "$*"`
162                       print_info 2 "CMD_UTILS_CC: $CMD_UTILS_CC"
163               ;;
164               --utils-ld=*)
165                       CMD_UTILS_LD=`parse_opt "$*"`
166                       print_info 2 "CMD_UTILS_LD: $CMD_UTILS_LD"
167               ;;
168               --utils-as=*)
169                       CMD_UTILS_AS=`parse_opt "$*"`
170                       print_info 2 "CMD_UTILS_AS: $CMD_UTILS_AS"
171               ;;
172               --utils-make=*)
173                       CMD_UTILS_MAKE=`parse_opt "$*"`
174                       print_info 2 "CMD_UTILS_MAKE: $CMD_UTILS_MAKE"
175               ;;
176               --utils-cross-compile=*)
177                       CMD_UTILS_CROSS_COMPILE=`parse_opt "$*"`
178                       CMD_UTILS_CROSS_COMPILE=$(echo ${CMD_UTILS_CROSS_COMPILE}|sed -e 's/.*[^-]$/&-/g')
179                       print_info 2 "CMD_UTILS_CROSS_COMPILE: $CMD_UTILS_CROSS_COMPILE"
180               ;;
181               --utils-arch=*)
182                       CMD_UTILS_ARCH=`parse_opt "$*"`
183                       print_info 2 "CMD_UTILS_ARCH: $CMD_ARCHOVERRIDE"
184               ;;
185               --makeopts=*)
186                       CMD_MAKEOPTS=`parse_opt "$*"`
187                       print_info 2 "CMD_MAKEOPTS: $CMD_MAKEOPTS"
188               ;;
189               --mountboot)
190                       CMD_MOUNTBOOT=1
191                       print_info 2 "CMD_MOUNTBOOT: $CMD_MOUNTBOOT"
192               ;;
193               --no-mountboot)
194                       CMD_MOUNTBOOT=0
195                       print_info 2 "CMD_MOUNTBOOT: $CMD_MOUNTBOOT"
196               ;;
197               --bootdir=*)
198                       BOOTDIR=`parse_opt "$*"`
199                       print_info 2 "BOOTDIR: $BOOTDIR"
200               ;;
201               --do-keymap-auto)
202                       CMD_DOKEYMAPAUTO=1
203                       print_info 2 "CMD_DOKEYMAPAUTO: $CMD_DOKEYMAPAUTO"
204               ;;
205               --evms2)
206                       CMD_EVMS2=1
207                       print_info 2 "CMD_EVMS2: $CMD_EVMS2"
208               ;;
209               --unionfs)
210                       echo
211                       print_warning 1 "WARNING: unionfs support is in active development and is not meant for general use."
212                       print_warning 1 "DISABLING UNIONFS SUPPORT AT THIS TIME."
213                       echo
214               ;;
215               --unionfs-dev)
216                       CMD_UNIONFS=1
217                       print_info 2 "CMD_UNIONFS: $CMD_UNIONFS"
218                       echo
219                       print_warning 1 "WARNING: unionfs support is in active development and is not meant for general use."
220                       print_warning 1 "Bug Reports without patches/fixes will be ignored."
221                       print_warning 1 "Use at your own risk as this could blow up your system."
222                       print_warning 1 "This code is subject to change at any time."
223                       echo
224               ;;
225               --lvm2)
226                       CMD_LVM2=1
227                       print_info 2 "CMD_LVM2: $CMD_LVM2"
228               ;;
229               --no-busybox)
230                       CMD_NO_BUSYBOX=1
231                       print_info 2 "CMD_NO_BUSYBOX: $CMD_NO_BUSYBOX"
232               ;;
233               --slowusb)
234                       CMD_SLOWUSB=1
235                       print_info 2 "CMD_SLOWUSB: $CMD_SLOWUSB"
236               ;;
237               --dmraid)
238                       if [ ! -e /usr/include/libdevmapper.h ]
239                       then
240                         echo 'Error: --dmraid requires device-mapper to be installed'
241                         echo '       on the host system; try "emerge device-mapper".'
242                         exit 1
243                       fi
244                       CMD_DMRAID=1
245                       print_info 2 "CMD_DMRAID: $CMD_DMRAID"
246               ;;
247               --bootloader=*)
248                       CMD_BOOTLOADER=`parse_opt "$*"`
249                       print_info 2 "CMD_BOOTLOADER: $CMD_BOOTLOADER"
250               ;;
251               --debuglevel=*)
252                       CMD_DEBUGLEVEL=`parse_opt "$*"`
253                       DEBUGLEVEL="${CMD_DEBUGLEVEL}"
254                       print_info 2 "CMD_DEBUGLEVEL: $CMD_DEBUGLEVEL"
255               ;;
256               --menuconfig)
257                       TERM_LINES=`stty -a | head -n 1 | cut -d\  -f5 | cut -d\; -f1`
258                       TERM_COLUMNS=`stty -a | head -n 1 | cut -d\  -f7 | cut -d\; -f1`
259
260                       if [[ TERM_LINES -lt 19 || TERM_COLUMNS -lt 80 ]]
261                       then
262                         echo "Error: You need a terminal with at least 80 columns"
263                         echo "       and 19 lines for --menuconfig; try --nomenuconfig..."
264                         exit 1
265                       fi
266                       CMD_MENUCONFIG=1
267                       print_info 2 "CMD_MENUCONFIG: $CMD_MENUCONFIG"
268               ;;
269               --no-menuconfig)
270                       CMD_MENUCONFIG=0
271                       print_info 2 "CMD_MENUCONFIG: $CMD_MENUCONFIG"
272               ;;
273               --gconfig)
274                       CMD_GCONFIG=1
275                       print_info 2 "CMD_GCONFIG: $CMD_GCONFIG"
276               ;;
277               --xconfig)
278                       CMD_XCONFIG=1
279                       print_info 2 "CMD_XCONFIG: $CMD_XCONFIG"
280               ;;
281               --save-config)
282                       CMD_SAVE_CONFIG=1
283                       print_info 2 "CMD_SAVE_CONFIG: $CMD_SAVE_CONFIG"
284               ;;
285               --no-save-config)
286                       CMD_SAVE_CONFIG=0
287                       print_info 2 "CMD_SAVE_CONFIG: $CMD_SAVE_CONFIG"
288               ;;
289               --mrproper)
290                       CMD_MRPROPER=1
291                       print_info 2 "CMD_MRPROPER: $CMD_MRPROPER"
292               ;;
293               --no-mrproper)
294                       CMD_MRPROPER=0
295                       print_info 2 "CMD_MRPROPER: $CMD_MRPROPER"
296               ;;
297               --clean)
298                       CMD_CLEAN=1
299                       print_info 2 "CMD_CLEAN: $CMD_CLEAN"
300               ;;
301               --no-clean)
302                       CMD_CLEAN=0
303                       print_info 2 "CMD_CLEAN: $CMD_CLEAN"
304               ;;
305               --oldconfig)
306                       CMD_CLEAN=0
307                       CMD_OLDCONFIG=1
308                       print_info 2 "CMD_CLEAN: $CMD_CLEAN"
309                       print_info 2 "CMD_OLDCONFIG: $CMD_OLDCONFIG"
310               ;;
311               --bootsplash=*)
312                       CMD_BOOTSPLASH=1
313                       CMD_GENSPLASH=0
314                       BOOTSPLASH_THEME=`parse_opt "$*"`
315                       print_info 2 "CMD_BOOTSPLASH: $CMD_BOOTSPLASH"
316                       print_info 2 "CMD_GENSPLASH: $CMD_GENSPLASH"
317                       print_info 2 "BOOTSPLASH_THEME: $BOOTSPLASH_THEME"
318               ;;
319               --bootsplash)
320                       CMD_BOOTSPLASH=1
321                       CMD_GENSPLASH=0
322                       print_info 2 "CMD_BOOTSPLASH: $CMD_BOOTSPLASH"
323                       print_info 2 "CMD_GENSPLASH: $CMD_GENSPLASH"
324               ;;
325               --no-bootsplash)
326                       CMD_BOOTSPLASH=0
327                       print_info 2 "CMD_BOOTSPLASH: $CMD_BOOTSPLASH"
328               ;;
329               --gensplash=*)
330                       CMD_GENSPLASH=1
331                       CMD_BOOTSPLASH=0
332                       GENSPLASH_THEME=`parse_opt "$*"`
333                       print_info 2 "CMD_GENSPLASH: $CMD_GENSPLASH"
334                       print_info 2 "GENSPLASH_THEME: $GENSPLASH_THEME"
335                       print_info 2 "CMD_BOOTSPLASH: $CMD_BOOTSPLASH"
336               ;;
337               --gensplash)
338                       CMD_GENSPLASH=1
339                       CMD_BOOTSPLASH=0
340                       GENSPLASH_THEME='default'
341                       print_info 2 "CMD_GENSPLASH: $CMD_GENSPLASH"
342                       print_info 2 "CMD_BOOTSPLASH: $CMD_BOOTSPLASH"
343               ;;
344               --no-gensplash)
345                       CMD_GENSPLASH=0
346                       print_info 2 "CMD_GENSPLASH: $CMD_GENSPLASH"
347               ;;
348               --gensplash-res=*)
349                       GENSPLASH_RES=`parse_opt "$*"`
350                       print_info 2 "GENSPLASH_RES: $GENSPLASH_RES"
351               ;;
352               --install)
353                       CMD_NOINSTALL=0
354                       print_info 2 "CMD_NOINSTALL: $CMD_NOINSTALL"
355               ;;
356               --no-install)
357                       CMD_NOINSTALL=1
358                       print_info 2 "CMD_NOINSTALL: $CMD_NOINSTALL"
359               ;;
360               --no-initrdmodules)
361                       CMD_NOINITRDMODULES=1
362                       print_info 2 "CMD_NOINITRDMODULES: $CMD_NOINITRDMODULES"
363               ;;
364               --udev)
365                       echo
366                       echo
367                       print_info 1 "--udev is deprecated and no longer necessary as udev is on by default"
368                       sleep 3
369                       echo
370                       echo
371                       print_info 2 "CMD_UDEV: $CMD_UDEV"
372               ;;
373               --no-udev)
374                       CMD_NO_UDEV=1
375                       print_info 2 "CMD_NO_UDEV: $CMD_NO_UDEV"
376               ;;
377               --no-devfs)
378                       CMD_NO_DEVFS=1
379                       print_info 2 "CMD_NO_DEVFS: $CMD_NO_DEVFS"
380               ;;
381               --callback=*)
382                       CMD_CALLBACK=`parse_opt "$*"`
383                       print_info 2 "CMD_CALLBACK: $CMD_CALLBACK/$*"
384               ;;
385               --static)
386                       CMD_STATIC=1
387                       print_info 2 "CMD_STATIC: $CMD_STATIC"
388               ;;
389               --initramfs)
390                       CMD_INITRAMFS=1
391                       print_info 2 "CMD_INITRAMFS: $CMD_INITRAMFS"
392               ;;
393               --tempdir=*)
394                       TMPDIR=`parse_opt "$*"`
395                       TEMP=${TMPDIR}/$RANDOM.$RANDOM.$RANDOM.$$
396                       print_info 2 "TMPDIR: $TMPDIR"
397                       print_info 2 "TEMP: $TEMP"
398               ;; 
399               --postclear)
400                       CMD_POSTCLEAR=1
401                       print_info 2 "CMD_POSTCLEAR: $CMD_POSTCLEAR"
402               ;; 
403               --arch-override=*)
404                       CMD_ARCHOVERRIDE=`parse_opt "$*"`
405                       print_info 2 "CMD_ARCHOVERRIDE: $CMD_ARCHOVERRIDE"
406               ;;
407               --color)
408                       CMD_USECOLOR=1
409                       print_info 2 "CMD_USECOLOR: $CMD_USECOLOR"
410               ;;
411               --no-color)
412                       CMD_USECOLOR=0
413                       print_info 2 "CMD_USECOLOR: $CMD_USECOLOR"
414               ;;
415               --debugfile=*)
416                       CMD_DEBUGFILE=`parse_opt "$*"`
417                       DEBUGFILE=`parse_opt "$*"`
418                       print_info 2 "CMD_DEBUGFILE: $CMD_DEBUGFILE"
419                       print_info 2 "DEBUGFILE: $CMD_DEBUGFILE"
420               ;;
421               --kerneldir=*)
422                       CMD_KERNELDIR=`parse_opt "$*"`
423                       print_info 2 "CMD_KERNELDIR: $CMD_KERNELDIR"
424               ;;
425               --kernel-config=*)
426                       CMD_KERNEL_CONFIG=`parse_opt "$*"`
427                       print_info 2 "CMD_KERNEL_CONFIG: $CMD_KERNEL_CONFIG"
428               ;;
429               --module-prefix=*)
430                       CMD_INSTALL_MOD_PATH=`parse_opt "$*"`
431                       print_info 2 "CMD_INSTALL_MOD_PATH: $CMD_INSTALL_MOD_PATH"
432               ;;
433               --cachedir=*)
434                       CACHE_DIR=`parse_opt "$*"`
435                       print_info 2 "CACHE_DIR: $CACHE_DIR"
436               ;;
437               --minkernpackage=*)
438                       CMD_MINKERNPACKAGE=`parse_opt "$*"`
439                       print_info 2 "MINKERNPACKAGE: $CMD_MINKERNPACKAGE"
440               ;;
441               --modulespackage=*)
442                       CMD_MODULESPACKAGE=`parse_opt "$*"`
443                       print_info 2 "MODULESPACKAGE: $CMD_MODULESPACKAGE"
444               ;;
445               --kerncache=*)
446                       CMD_KERNCACHE=`parse_opt "$*"`
447                       print_info 2 "KERNCACHE: $CMD_KERNCACHE"
448               ;;
449               --kernname=*)
450                       CMD_KERNNAME=`parse_opt "$*"`
451                       print_info 2 "KERNNAME: $CMD_KERNNAME"
452               ;;
453               --symlink)
454                       CMD_SYMLINK=1
455                       print_info 2 "CMD_SYMLINK: $CMD_SYMLINK"
456               ;;
457               --no-kernel-sources)
458                       CMD_NO_KERNEL_SOURCES=1
459                       print_info 2 "CMD_NO_KERNEL_SOURCES: $CMD_NO_KERNEL_SOURCES"
460               ;;
461               --initramfs-overlay=*)
462                       CMD_INITRAMFS_OVERLAY=`parse_opt "$*"`
463                       print_info 2 "CMD_INITRAMFS_OVERLAY: $CMD_INITRAMFS_OVERLAY"
464               ;;
465               --linuxrc=*)
466                         CMD_LINUXRC=`parse_opt "$*"`
467                         print_info 2 "CMD_LINUXRC: $CMD_LINUXRC"
468               ;;
469               --genzimage)
470                         KERNEL_MAKE_DIRECTIVE_2='zImage.initrd'
471                         KERNEL_BINARY_2='arch/ppc/boot/images/zImage.initrd.chrp'
472                         GENERATE_Z_IMAGE=1
473                         print_info 2 "GENERATE_Z_IMAGE: $GENERATE_Z_IMAGE"
474               ;;
475               --disklabel)
476                       CMD_DISKLABEL=1
477                       print_info 2 "CMD_DISKLABEL: $CMD_DISKLABEL"
478               ;;
479               --luks)
480                       CMD_LUKS=1
481                       print_info 2 "CMD_LUKS: $CMD_LUKS"
482               ;;
483               all)
484                       BUILD_KERNEL=1
485                       BUILD_MODULES=1
486                       BUILD_INITRD=1
487               ;;
488               initrd)
489                       BUILD_INITRD=1
490               ;;
491               kernel)
492                       BUILD_KERNEL=1
493                       BUILD_MODULES=1
494                       BUILD_INITRD=0
495               ;;
496               bzImage)
497                       BUILD_KERNEL=1
498                       BUILD_MODULES=0
499                       BUILD_INITRD=1
500                       CMD_NOINITRDMODULES=1
501                       print_info 2 "CMD_NOINITRDMODULES: $CMD_NOINITRDMODULES"
502               ;;
503               --help)
504                       longusage
505                       exit 1
506               ;;
507               --version)
508                       echo "${GK_V}"
509                       exit 0
510               ;;
511               *)
512                       echo "Error: Unknown option '$*'!"
513                       exit 1
514               ;;
515         esac
516 }