On Thu, Aug 12, 2010 at 10:43:22AM +0200, Marc Kleine-Budde wrote:
> Bart vdr. Meulen wrote:
> > From: Remy Bohmer <li...@bohmer.net>
> > 
> > Add sysctl.conf to busybox configuration
> > 
> > Add option to install an generic, or project specific sysctl.conf file on 
> > the
> > target filesystem.
> > Also add the option to read the file during boot-time
> 
> notice that there already is a sysctl.conf for the procpc package. Maybe
> we need this sysctl in the rootfs package.
> 
> Michael, what do you think?

I would install it with the packages: sysctl.conf, init script and link.
You can't select both, so there can be no conflict.

mol

> Marc
> > 
> > Signed-off-by: Bart vdr. Meulen <bartvdrmeu...@gmail.com>
> > Signed-off-by: Remy Bohmer <li...@bohmer.net>
> > ---
> >  generic/etc/init.d/sysctl    |   23 +++++++++++++++++++++++
> >  rules/busybox.make           |    8 ++++++++
> >  rules/initmethod-bbinit.in   |   13 +++++++++++++
> >  rules/initmethod-bbinit.make |    6 ++++++
> >  4 files changed, 50 insertions(+), 0 deletions(-)
> >  create mode 100644 generic/etc/init.d/sysctl
> > 
> > diff --git a/generic/etc/init.d/sysctl b/generic/etc/init.d/sysctl
> > new file mode 100644
> > index 0000000..d23f9d5
> > --- /dev/null
> > +++ b/generic/etc/init.d/sysctl
> > @@ -0,0 +1,23 @@
> > +#! /bin/sh
> > +# /etc/init.d/sysctl: Set kernel variables from /etc/sysctl.conf
> > +#
> > +
> > +PATH=/sbin:$PATH
> > +which sysctl > /dev/null || exit 0
> > +
> > +case "$1" in
> > +   start|restart|force-reload)
> > +           for file in /etc/sysctl.conf /etc/sysctl.d/*.conf ; do
> > +                   if [ -r "$file" ] ; then
> > +                           sysctl -p "$file" > /dev/null 2>&1
> > +                   fi
> > +           done
> > +           ;;
> > +   stop)
> > +           ;;
> > +   *)
> > +           echo "Usage: /etc/init.d/sysctl 
> > {start|stop|restart|force-reload}" >&2
> > +           exit 3
> > +           ;;
> > +esac
> > +exit 0
> > diff --git a/rules/busybox.make b/rules/busybox.make
> > index 11eeddf..bcaf525 100644
> > --- a/rules/busybox.make
> > +++ b/rules/busybox.make
> > @@ -165,6 +165,10 @@ ifneq ($(call remove_quotes, 
> > $(PTXCONF_BUSYBOX_HWCLOCK_BBINIT_LINK)),)
> >             /etc/rc.d/$(PTXCONF_BUSYBOX_HWCLOCK_BBINIT_LINK))
> >  endif
> >  endif
> > +
> > +ifdef INITMETHOD_BBINIT_ETC_INITD_SYSCTL
> > +   @$(call install_alternative, busybox, 0, 0, 0755, /etc/init.d/sysctl)
> > +endif
> >  endif # PTXCONF_INITMETHOD_BBINIT
> >  
> >  #  #
> > @@ -185,6 +189,10 @@ ifdef PTXCONF_BUSYBOX_CROND
> >     @$(call install_copy, busybox, 0, 0, 0755, /var/spool/cron/crontabs/)
> >  endif
> >  
> > +ifdef PTXCONF_BUSYBOX_BB_SYSCTL
> > +   @$(call install_alternative, busybox, 0, 0, 0755, /etc/sysctl.conf)
> > +endif
> > +
> >     @$(call install_finish, busybox)
> >  
> >     @$(call touch)
> > diff --git a/rules/initmethod-bbinit.in b/rules/initmethod-bbinit.in
> > index 0d1af16..361eb23 100644
> > --- a/rules/initmethod-bbinit.in
> > +++ b/rules/initmethod-bbinit.in
> > @@ -55,6 +55,13 @@ config INITMETHOD_BBINIT_ETC_INITD_RT_SET_BANDWIDTH
> >       The /etc/init.d/rt-set-bandwidth script configures the bandwidth 
> > feature
> >       of linux-rt. Default is to disable it.
> >  
> > +config INITMETHOD_BBINIT_ETC_INITD_SYSCTL
> > +   bool
> > +   prompt "Install /etc/init.d/sysctl"
> > +   default y
> > +   help
> > +     Install a start script to read /etc/sysctl.conf at startup
> > +
> >  menu "service startup configuration "
> >  
> >  source "generated/initmethod_bbinit.in"
> > @@ -89,6 +96,12 @@ config INITMETHOD_BBINIT_LINK_RT_SET_BANDWIDTH
> >     prompt "rt-set-bandwidth"
> >     default "S03rt-set-bandwidth"
> >  
> > +config INITMETHOD_BBINIT_LINK_SYSCTL
> > +   string
> > +   depends on INITMETHOD_BBINIT_ETC_INITD_SYSCTL
> > +   prompt "sysctl"
> > +   default "S17sysctl"
> > +
> >  endmenu
> >  
> >  endif
> > diff --git a/rules/initmethod-bbinit.make b/rules/initmethod-bbinit.make
> > index cd67eb1..9d2b77d 100644
> > --- a/rules/initmethod-bbinit.make
> > +++ b/rules/initmethod-bbinit.make
> > @@ -167,6 +167,12 @@ ifneq ($(call 
> > remove_quotes,$(PTXCONF_INITMETHOD_BBINIT_LINK_RT_SET_BANDWIDTH)),
> >             /etc/rc.d/$(PTXCONF_INITMETHOD_BBINIT_LINK_RT_SET_BANDWIDTH))
> >  endif
> >  
> > +ifneq ($(call remove_quotes,$(PTXCONF_INITMETHOD_BBINIT_LINK_SYSCTL)),)
> > +   @$(call install_link, initmethod-bbinit, \
> > +           ../init.d/sysctl, \
> > +           /etc/rc.d/$(PTXCONF_INITMETHOD_BBINIT_LINK_SYSCTL))
> > +endif
> > +
> >     @$(call install_finish, initmethod-bbinit)
> >  
> >     @$(call touch)
> 
> 
> -- 
> Pengutronix e.K.                  | Marc Kleine-Budde           |
> Industrial Linux Solutions        | Phone: +49-231-2826-924     |
> Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
> Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |
> 



> -- 
> ptxdist mailing list
> ptxdist@pengutronix.de


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

Reply via email to