Re: [firstboot] Fix firstboot for s390 architecture

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Run firstboot the first time root user logs in
> with a capable terminal
> ---
>  firstboot.spec       |   13 +++++++++++--
>  scripts/firstboot.sh |   21 +++++++++++++++++++++
>  setup.py             |   19 +++++++++++++------
>  3 files changed, 45 insertions(+), 8 deletions(-)
>  create mode 100644 scripts/firstboot.sh

I've never liked this idea, and I continue to not like it.  However, I'm
no longer the package maintainer and the patch looks good to me.  So I
guess it's fine.

>  %changelog
> +* Fri Feb 12 2010 Martin Gracik <mgracik@xxxxxxxxxx> 1.111-1
> +- Run firstboot the first time root logs in on s390 machines.
> +

If you have a bug number for this (and I'm sure there's at least one)
then you should reference it in the changelog and commit message for our
future reference.

> --- /dev/null
> +++ b/scripts/firstboot.sh
> @@ -0,0 +1,21 @@
> +# firstboot.sh
> +
> +FIRSTBOOT_EXEC=/usr/sbin/firstboot
> +FIRSTBOOT_CONF=/etc/sysconfig/firstboot
> +
> +# source the config file
> +[ -f $FIRSTBOOT_CONF ] && . $FIRSTBOOT_CONF
> +
> +# check if we should run firstboot
> +if [ -f $FIRSTBOOT_EXEC ] && [ "${RUN_FIRSTBOOT,,}" = "yes" ]; then
> +    # check if we're not on 3270 terminal and root
> +    if [ $(/sbin/consoletype) = "pty" ] && [ $EUID -eq 0 ]; then
> +        args=""
> +        if grep -i "reconfig" /proc/cmdline >/dev/null || [ -f /etc/reconfigSys ]; then
> +            args="--reconfig"
> +        fi
> +
> +        . /etc/sysconfig/i18n
> +        $FIRSTBOOT_EXEC $args
> +    fi
> +fi

You'll want to take special care here to make sure the arguments for
starting firstboot and the tests for whether we should start it or not
stay the same between this file and the init script.

- Chris

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux