> Sounds like a typical sed job:
>
> bashcfg_add ()
> {
> sed "s/$1=(\([^)]*\))/$1=(\1 $2)/"
> }
> bashcfg_remove ()
> {
> sed "s/$1=(\([^)]*\)$2\([^)]*\))/$1=(\1\2)/"
> }
>
> </etc/rc.conf bashcfg_add DAEMONS kdm|bashcfg_remove DAEMONS xdm
>
> Why implement this in C++?
>
> Jürgen
>
>
> _______________________________________________
> arch mailing list
> [email protected]
> http://archlinux.org/mailman/listinfo/archI have a suggestion. Why not take this even further and make a nice script called for example 'services' that adds or removes daemons from rc.conf For example, "services add samba" will add samba to rc.conf "services remove samba" would remove samba fdrom rc.conf daemons array. Another nice thing it to make it throw a message to the user is the daemon samba isn't actually there ( installed ) or is already added. That would be real cool and useful.
signature.asc
Description: This is a digitally signed message part
_______________________________________________ arch mailing list [email protected] http://archlinux.org/mailman/listinfo/arch
