On Tue, Nov 9, 2010 at 8:14 PM, Brian C. Lane <[email protected]> wrote:

> Allow editing of the bootloader config file's timeout and totaltimeout
> settings.
> ---
>  tools/livecd-iso-to-disk.sh |   22 ++++++++++++++++++++--
>  1 files changed, 20 insertions(+), 2 deletions(-)
>
> diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
> index 72211d2..2303209 100755
> --- a/tools/livecd-iso-to-disk.sh
> +++ b/tools/livecd-iso-to-disk.sh
> @@ -23,7 +23,7 @@
>  export PATH=/sbin:/usr/sbin:$PATH
>
>  usage() {
> -    echo "$0 [--format] [--reset-mbr] [--noverify] [--overlay-size-mb
> <size>] [--home-size-mb <size>] [--unencrypted-home] [--skipcopy] [--efi]
> <isopath> <usbstick device>"
> +    echo "$0 [--timeout <time>] [--totaltimeout <time>] [--format]
> [--reset-mbr] [--noverify] [--overlay-size-mb <size>] [--home-size-mb
> <size>] [--unencrypted-home] [--skipcopy] [--efi] <isopath> <usbstick
> device>"
>     exit 1
>  }
>
> @@ -452,6 +452,16 @@ while [ $# -gt 2 ]; do
>        --multi)
>            multi=1
>            ;;
> +        --timeout)
> +            checkint $2
> +            timeout=$2
> +            shift
> +            ;;
> +        --totaltimeout)
> +            checkint $2
> +            totaltimeout=$2
> +            shift
> +            ;;
>        *)
>            echo "invalid arg -- $1"
>            usage
> @@ -487,7 +497,7 @@ if [ -z "$noverify" ]; then
>     fi
>  fi
>
> -checkFilesystem $USBDEV
> +#checkFilesystem $USBDEV
>  # do some basic sanity checks.
>  checkMounted $USBDEV
>  if [ -n "$format" -a -z "$skipcopy" ];then
> @@ -707,6 +717,14 @@ if [ "$isotype" = "netinst" ]; then
>   sed -i -e "s;stage2=\S*;stage2=hd:$USBLABEL:/images/install.img;g"
> $BOOTCONFIG $BOOTCONFIG_EFI
>  fi
>
> +# Adjust the boot timeouts
> +if [ -n "$timeout" ]; then
> +    sed -i -e "s/^timeout.*$/timeout\ $timeout/" $BOOTCONFIG
> +fi
> +if [ -n "$totaltimeout" ]; then
> +    sed -i -e "/^timeout.*$/a\totaltimeout\ $totaltimeout" $BOOTCONFIG
> +fi
> +
>  # Use repo if the .iso has the repository on it, otherwise use stage2
> which
>  # will default to using the network mirror
>  if [ -e "$CDMNT/.discinfo" ]; then
> --
> 1.7.3.2


Please also update livecd-iso-to-disk.pod,
http://git.fedorahosted.org/git/?p=livecd;a=blob;f=docs/livecd-iso-to-disk.pod;h=bbb54f2c8b34c524b5bdb03962af6ccbe13740b5;hb=HEAD

<http://git.fedorahosted.org/git/?p=livecd;a=blob;f=docs/livecd-iso-to-disk.pod;h=bbb54f2c8b34c524b5bdb03962af6ccbe13740b5;hb=HEAD>Thank
you,        --Fred
--
livecd mailing list
[email protected]
https://admin.fedoraproject.org/mailman/listinfo/livecd

Reply via email to