tech-userlevel archive

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

tweaking /etc/rc.d/sysdb



Hello,

a note and a question about the sysdb rc.d script:

- The check_file() function could (and IMHO should) avoid calling
  basename(1) (see attached patch).

- What about being able to selectively disable creation of some of the
  databases? I'm running sysdb on systems with too little storage space
  for services.db...


Cheers, Jukka

-- 
bashian roulette:
$ ((RANDOM%6)) || rm -rf ~
Index: etc/rc.d/sysdb
===================================================================
RCS file: /cvsroot/src/etc/rc.d/sysdb,v
retrieving revision 1.20
diff -u -p -r1.20 sysdb
--- etc/rc.d/sysdb      26 Aug 2007 23:55:50 -0000      1.20
+++ etc/rc.d/sysdb      28 Jan 2008 11:18:50 -0000
@@ -44,7 +44,7 @@ check_file()
                return
        fi
        if [ \( ! -f "$db" \) -o \( "$src" -nt "$db" \) ]; then
-               $echo -n "$comma$(basename "$src")"
+               $echo -n "$comma${src##*/}"
                comma=", "
                "$@"
        fi


Home | Main Index | Thread Index | Old Index