[arch-releng] [PATCH] [RFC][syslinux-iso] Fix double execution of initscripts hooks.
Gerardo Exequiel Pozzi
vmlinuz386 at yahoo.com.ar
Tue May 3 19:50:19 EDT 2011
On 05/01/2011 05:07 PM, Gerardo Exequiel Pozzi wrote:
> Partially revert commit b171f8f11fdc04a22c7b8f3ff3b9dd164986daae
>
> Fixes https://bugs.archlinux.org/task/23786
>
> Signed-off-by: Gerardo Exequiel Pozzi<vmlinuz386 at yahoo.com.ar>
> ---
> configs/syslinux-iso/overlay/etc/archiso/functions | 20 ++++++++++++++++++++
> configs/syslinux-iso/overlay/etc/rc.conf | 2 +-
> .../overlay/etc/rc.d/functions.d/archiso | 20 --------------------
> .../overlay/etc/rc.d/functions.d/automated_script | 2 ++
> 4 files changed, 23 insertions(+), 21 deletions(-)
> create mode 100644 configs/syslinux-iso/overlay/etc/archiso/functions
> delete mode 100644 configs/syslinux-iso/overlay/etc/rc.d/functions.d/archiso
>
> diff --git a/configs/syslinux-iso/overlay/etc/archiso/functions b/configs/syslinux-iso/overlay/etc/archiso/functions
> new file mode 100644
> index 0000000..02b41cf
> --- /dev/null
> +++ b/configs/syslinux-iso/overlay/etc/archiso/functions
> @@ -0,0 +1,20 @@
> +# vim: set ft=sh:
> +
> +# kernel_cmdline<param>
> +# Looks for a parameter on the kernel's boot-time command line.
> +#
> +# returns: 0 if param was found. Also prints its value if it was a K=V param.
> +# 1 if it was not
> +#
> +kernel_cmdline ()
> +{
> + for param in $(/bin/cat /proc/cmdline); do
> + case "${param}" in
> + $1=*) echo "${param##*=}"; return 0 ;;
> + $1) return 0 ;;
> + *) continue ;;
> + esac
> + done
> +
> + return 1
> +}
> diff --git a/configs/syslinux-iso/overlay/etc/rc.conf b/configs/syslinux-iso/overlay/etc/rc.conf
> index 3ce3c5a..2819a32 100644
> --- a/configs/syslinux-iso/overlay/etc/rc.conf
> +++ b/configs/syslinux-iso/overlay/etc/rc.conf
> @@ -1,7 +1,7 @@
> #
> # /etc/rc.conf - Main Configuration for Arch Linux
>
> -. /etc/rc.d/functions
> +. /etc/archiso/functions
>
> LOCALE_DEFAULT="en_US.UTF-8"
> CLOCK_DEFAULT=""
> diff --git a/configs/syslinux-iso/overlay/etc/rc.d/functions.d/archiso b/configs/syslinux-iso/overlay/etc/rc.d/functions.d/archiso
> deleted file mode 100644
> index 02b41cf..0000000
> --- a/configs/syslinux-iso/overlay/etc/rc.d/functions.d/archiso
> +++ /dev/null
> @@ -1,20 +0,0 @@
> -# vim: set ft=sh:
> -
> -# kernel_cmdline<param>
> -# Looks for a parameter on the kernel's boot-time command line.
> -#
> -# returns: 0 if param was found. Also prints its value if it was a K=V param.
> -# 1 if it was not
> -#
> -kernel_cmdline ()
> -{
> - for param in $(/bin/cat /proc/cmdline); do
> - case "${param}" in
> - $1=*) echo "${param##*=}"; return 0 ;;
> - $1) return 0 ;;
> - *) continue ;;
> - esac
> - done
> -
> - return 1
> -}
> diff --git a/configs/syslinux-iso/overlay/etc/rc.d/functions.d/automated_script b/configs/syslinux-iso/overlay/etc/rc.d/functions.d/automated_script
> index 7a35acb..edb8ea3 100644
> --- a/configs/syslinux-iso/overlay/etc/rc.d/functions.d/automated_script
> +++ b/configs/syslinux-iso/overlay/etc/rc.d/functions.d/automated_script
> @@ -1,3 +1,5 @@
> +. /etc/archiso/functions
> +
> automated_script ()
> {
> script="$(kernel_cmdline script)"
pushed to master.
--
Gerardo Exequiel Pozzi
\cos^2\alpha + \sin^2\alpha = 1
More information about the arch-releng
mailing list