* Frank Terbeck <ft@grml.org> [20070916 12:47]:
> Michael Prokop <mika@grml.org>:
> > * ft <bts@bts.grml.org> [20070916 12:10]:
> > > 'lsb-functions' implements these functions:
> > > _eend [internal]
> > > have_tput [internal]
> I added have_tput() myself. I think I'll rename it to _have_tput() to
> show it is for internal use only.
Great.
> > > add_suffix
> I really want to get rid of dolisting():
> > > dolisting
Feel free :)
> > > ebegin
> > > eend [required]
> > > eerror [required]
> > > eindent [required]
> > > einfo [required]
> > > einfon [required]
> > > eoutdent [required]
> > > esetdent
> > > esyslog [required]
> > > ewarn [required]
> > > ewend
> I'll check which of the other e*() functions are required by others. I
> suspect, they're all needed.
Ok
> I'm completely indifferent about these. No idea if they'd ever be
> useful:
> > > is_net_fs
-> currently we don't need it, if you ever need such a function we
know where we can take it from again ;)
> > > is_uml_sys
-> we don't support UML and never will, so let's drop it
> > > is_vserver_sys
-> works only inside vserver instances (so not on the vserver-host
itself), we can drop that as well for now (like for is_net_fs)
> I don't get the purpose of this one at all:
> > > get_libdir
> Here's its code:
> [snip]
> get_libdir() {
> if [ -n "${CONF_LIBDIR_OVERRIDE}" ] ; then
> CONF_LIBDIR="${CONF_LIBDIR_OVERRIDE}"
> elif [ -x "/usr/bin/portageq" ] ; then
> CONF_LIBDIR="$(/usr/bin/portageq envvar CONF_LIBDIR)"
> fi
> printf '%s\n' ${CONF_LIBDIR:=lib}
> }
> [snap]
Gentoo-specific, we don't need it. :)
> These might be useful sometime in the future. (I don't know if they
> could maybe even simplify existing scripts. ...because I don't know
> the existing scripts. :-) ):
> > > get_bootconfig
> > > get_bootparam
> > > is_older_than
> > > reverse_list
> > > get_mount_fstab
> These just do 'return 0'. Unless you think they are needed I'll remove
> them:
We have such functions also in /etc/grml/script-functions and
/etc/grml/sh-lib. I'd like to merge as much as possible. I
appreciate any feedback. :) [Though I'm not yet sure how to create a
new "API" without breaking anything, maybe we should clean up
lsb-functions as far as possible (without breaking any scripts) and
provide all the useful functions for scripts (interactive as well as
init-style scripts) in a new file (could be even
/etc/grml/script-functions as I'm the only one really using it
AFAICS).
> > > profiling
> > > splash
> These are the same very similar to their counterparts without the
> leading 'v', except that they just take action, if $RC_VERBOSE equals
> 'yes'. They are pretty simple and cleanly implemented. It wouldn't
> hurt to keep them (although they are currently not needed and *could*
> be removed): - (Thoughts?) -
Let's drop it, let's make it as clean and simple as possible.
Especially because Debian provides /lib/lsb/init-functions now as
well and I don't want to reinvent any wheels. :)
> > > vebegin
> > > veend
> > > veend
> > > veerror
> > > veinfo
> > > veinfon
> > > vewarn
> > > I grepped through our repositories and the functions we use are:
> > > einfo, ewarn, eerror, eend, eindent, eoutdent, esyslog
> > Plus:
> > einfon
> > which is used in grml-debootstrap and grml-iptstate.
> Ah right, my multi-line zargs grep expression had a bug. :-)
:)
> > > Functions I find particularly ugly are everything containing *KV* in their
> > > name and the dolisting function.
> > > So, what do we need/want from that file? What could be dismissed?
> > No, we can drop all the *KV* stuff without any problem.
> Okay. I removed from the list above. I'll update the status of the
> remaining stuff as soon as I get to it.
Great.
regards,
-mika- |