commit e9bde3d19ee28c4d3ab416430d7e2a5235db7ae3
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Thu Nov 27 09:29:30 2008 -0800

    Fix previous broken commit
    
    Wasn't even build tested, apparently.

commit 254d7b96be22ca827385dae4675ca190b61824bb
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Sun Nov 2 09:34:54 2008 -0800

    Report errors with more useful messages
    
    This still doesn't do a great job of handling errors, but at least the
    user may see some reasonable information if they occur.

commit 4cead4059f4971c2be63bde5b0b4ab500e493186
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Wed Oct 1 06:59:59 2008 -0700

    Add reference count to initd type
    
    Since we can now have an arbitrary number of nodes pointing to the same
    initd type, a reference count is added so that the initd is only
    destroyed when there are no references left.

commit 29ed87c7a77549400da3a59490d5f996ffea5da2
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Tue Sep 23 07:51:47 2008 -0700

    Use nodes in list instead of duplicating all initd types
    
    Currently, the entire initd structure is duplicated each time a list is
    copied. Since the initd is not specific to each list, this could cause
    problems where changing a value in one initd would not be reflected in
    the equivalent initd in another list. This also wastes memory as each
    initd duplicated when only one copy is needed.
    
    This change introduces the initd_node type. It points to an initd type
    and contains the list pointers for inclusion in an initd_list type.
    The typical constructors and destructors have been added for handling
    these types in lists.
    
    Quite a few places needed to be changed where there were iterations over
    lists. We should really add accessor functions and use those whenever
    we need access to members of a list.

commit ba61d1f2393ca12ec664f0836a673c86558936aa
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Sun Nov 2 09:48:18 2008 -0800

    Also reset errno for the symlink reading loop

commit 48698bb6ce2e77dda8555bfbca8b10f8a640b930
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Sun Nov 2 09:36:14 2008 -0800

    Reset errno before readdir to avoid false errors
    
    After readdir completes, errno is check to see if any errors were
    produced. However, if readdir is successful, it will not change the
    current errno value. Reset it before the loop to ensure any errors are
    due to the readdir calls.

commit c2d8ac0e5a2726df0c4da852d13238a591d85721
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Sun Sep 7 08:34:37 2008 -0700

    Post-release version bump

commit e27b5633d4e7d4790c8f1991650d1411acf94b80
Author: DJ Lucas <dj@linuxfromscratch.org>
Date:   Mon Sep 1 09:42:48 2008 -0700

    Fix handling of optional dependencies
    
    When an missing dependency from Should-Start or Should-Stop was
    encountered, all the processing was being skipped instead just moving to
    the next dependency.

commit 23037b6b0ef54e3b0c508a05860d9af2070ee2b3
Author: DJ Lucas <dj@linuxfromscratch.org>
Date:   Mon Sep 1 09:38:15 2008 -0700

    Correct stop link ordering
    
    The logic for writing new stop links was walking through the ordered
    list backwards, causing the stop links to be created incorrectly.

commit 1d9509f290cefc0c85f80ba1c6e7bc82f9463406
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Sun Aug 31 11:28:47 2008 -0700

    Post-release version bump

commit 3e5c82750bb7369950d77f6cdd158602eac79992
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Sun Aug 31 11:07:58 2008 -0700

    Correct the LSB location of the programs
    
    The LSB says that the programs should live in /usr/lib/lsb, not
    /usr/lib/initd. Whoops.

commit d4cd09623c64239e65128415481fee7ba101fa9c
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Sun Aug 31 11:02:55 2008 -0700

    Post-release version bump

commit 4c1837681fd3320654919d1dd7b40757f08a803e
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Sun Aug 31 09:22:08 2008 -0700

    Set release date statically in configure
    
    No need to have the release date recomputed every time someone runs
    configure.

commit 660ba28d97c01b8136aee90e9c75da4c3b1ad482
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Sun Aug 31 09:19:31 2008 -0700

    Tear out the buggy dirent d_type code for now
    
    Trying to use the d_type field from the dirent structure returns
    DT_UNKNOWN sometimes causing the pool to never be populated. Remove it
    for now in favor of the more portable stat() usage.

commit 9a0f403371c7f9215f1a6649fcc3773778c7277f
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Fri Jun 20 09:00:25 2008 -0700

    Fix ChangeLog generation for distcheck
    
    The only sane way to handle the ChangeLog generation is to only create
    it when we have a .git directory and srcdir != builddir.

commit fe69ad97de34116d9534d5e7e7fe96ec8cb9ffc2
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Tue Jun 17 08:48:31 2008 -0700

    Fix tests when $srcdir != $builddir
    
    In order to make the tests work when the build directory is not the
    source directory, we always copy the service scripts to an init.d
    directory in the build directory. This means we can drop some of the
    hacks to try to get the rc symlinks correct.

commit 47d92b18b472a2513b98f56c345b4eb615822978
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Mon Jun 16 17:59:46 2008 -0700

    Change the initd dir option to --with-initddir
    
    This is more consistent with the initd libdir option.

commit e7f7364307166f86f7f9ae264085857a9795b5a4
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Mon Jun 16 17:55:40 2008 -0700

    Drop the $exec_prefix hackery
    
    Users will just have to pass the correct flags if they want an LSB
    conforming installation. Guessing $exec_prefix to try to get the correct
    initd libdir is too error prone.

commit 24a028ca4e4afba8e3c9d818d9dadbea3865ccc2
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Mon Jun 16 17:52:09 2008 -0700

    Install programs to initd libdir and make directory configurable
    
    Since the canonical location for install_initd and remove_initd is
    /usr/lib/initd, the actual programs are installed there and symlinks
    are placed in $sbindir.
    
    The initd libdir, /usr/lib/initd, is made configurable, but defaults
    to $exec_prefix/lib/initd to allow the package to be easily prefixed.

commit e36ecfdd70d2dab023f635a9b57c993138e2f107
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Mon Jun 16 10:06:23 2008 -0700

    Add automake required files, including GPLv2 license
    
    Added the COPYING, AUTHORS, NEWS and README files. The COPYING file is
    standard GPLv2, which we will use for this package. Copyrights will be
    added to individual source files later.
    
    The NEWS and README files are currently empty, but will be populated
    later. The INSTALL file will also be included in the tarball, but we'll
    just use the standard GNU INSTALL file from automake.

commit 1300507a26c29e966b53d1da34e766c442318ea1
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Mon Jun 16 10:00:11 2008 -0700

    Add rules for generating ChangeLog
    
    The ChangeLog file will be generated from the git log at dist time and
    included in the tarball.

commit a11f47b8a13e7d5f626f9d9349a3adac262580bb
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Mon Jun 16 07:58:24 2008 -0700

    Create relative symlinks in /lib/initd
    
    It's nice to create relative symlinks from /lib/initd to /sbin so that
    the link path is always correct no matter where the filesystems are
    mounted. To accomplish this, a script abs2rel.sh has been added which
    converts two directory paths to a relative path. This is used to find
    the relative path between /lib/initd and /sbin.

commit 339b2f23accfab28dc1a255f75fb69b52657bf18
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Thu Jun 12 02:41:12 2008 -0700

    Create the rc*.d directories if necessary when creating links
    
    When the user is installing links, they may not have the rc*.d
    directories created yet. This changes the behavior to attempt to create
    the directory if it doesn't exist.

commit 1cc0d042fb265bc429800f6e645ce997cbb05de9
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Wed Jun 11 18:54:02 2008 -0700

    Set the default installation directories appropriately
    
    In the typical install, we want the data (man pages) to go to /usr, but
    the programs to go in the root directory. This sets $prefix and
    $exec_prefix appropriately if they have not been set by the user.

commit cc52dd3cff043ccdb6c2dc3d477915c751945c78
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Wed Jun 11 18:28:10 2008 -0700

    Create links in $libdir/initd on install
    
    The LSB specification says that the programs should be called from
    /lib/initd/{install,remove}_initd, so we create symlinks in that
    directory to be conformant.

commit 267d66671f0bf13f42a403b0ab9743a1f10bc143
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Wed Jun 11 18:08:55 2008 -0700

    test: Don't check active levels in the dep removal test
    
    Since initd_remove_recurse_deps already handles the current activity
    level, we don't need to check it in the test. This removes some false
    failures in the test.

commit 6c16811d7ee4636238090b3f1da24bb82f0180fc
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Wed Jun 11 08:56:42 2008 -0700

    Add manual pages for install_initd and remove_initd
    
    Manual pages for install_initd and remove_initd have been added to the
    repo. They're a little bare for now.

commit f5898b8665320b1eb271750062bdf0f23f820306
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Tue Jun 10 18:02:06 2008 -0700

    Refactor common dependency and symlink handling into common routine
    
    install_initd and remove_initd take the exact same actions, with the
    exception of calling the dep handler for adding services or for
    removing services. This factors those actions into a common function,
    installrm_action, which takes a boolean indicating whether we are
    installing or removing services.

commit fb295fccaf2a5d6680ad0305b929dfd1005ce49c
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Tue Jun 10 09:11:46 2008 -0700

    Only pass service basenames to the intid functions
    
    The initd functions operate on service names rather than full paths, so
    the directory names are stripped off. This is not quite correct as we
    really want to just strip the init.d directory name from the beginning
    of the path and leave the rest. However, it should work in practice as
    only one init.d directory can be used and we expect it to be a flat
    directory containing scripts.

commit cf1e6b512835784b8672623e524fd355e85d41df
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Tue Jun 10 09:03:37 2008 -0700

    Use common set_initd_dir routine to determine init.d directory
    
    Add a new function set_initd_dir() to find the init.d directory from a
    combination of a previously set string (the -d parameter), the directory
    names of the arguments, or the default init.d directory.

commit 05df7b59743fb083fb97ade53e01e823f3d88166
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Wed Jun 4 19:03:59 2008 -0700

    Split out common program functions into separate object file
    
    Some routines will be exactly the same between install_initd and
    remove_initd. This splits them out into a common util.c file.
    
    This also adds a new function, get_initd_dir, which wraps dirname, but
    returns NULL instead of "." when there is no directory component.

commit a149717c9ca9ad800280607fd9200e5a71c1b4c3
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Wed Jun 4 18:42:02 2008 -0700

    Rename libinitd headers with initd- prefix to avoid conflicts
    
    Since the libinitd headers are used throughout the tree, we want to
    avoid naming conflicts, such as util.h.

commit 2df7f01ed40320821aa23fe351c6d4913664e1a5
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Wed Jun 4 09:13:24 2008 -0700

    Include all the libinitd headers from initd.h
    
    Rather than having all the programs include each header they need, just
    have initd.h include all the headers that define interfaces in libinitd.

commit 4a52f1a86b17cafef71f51793c0778f430323f11
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Wed Jun 4 08:52:56 2008 -0700

    Add basename and dirname wrapper utilities
    
    Added wrappers for the basename() and dirname() functions that handle
    the copying of the strings correctly. The initd_parse routine has been
    adjusted to use this wrapper instead of the libc version.

commit 04471bd33edb8100b9604ab5e304104ad2055d44
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Tue Jun 3 18:02:43 2008 -0700

    Define default init.d directory
    
    This allows the default init.d directory to be set from configure. By
    default, it will be /etc/init.d.

commit 8d5a2cd25a2cfe6e14a45d53c3ae225f695d0b11
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Tue Jun 3 09:10:04 2008 -0700

    Add remove_initd program
    
    Create the executable remove_initd for removing services using Linux
    Standard Base (LSB) headers. It removes symlinks for use in a System-V
    initialization scheme.

commit 15ed6c5ed519865bb9ce1c0974534f8f003b4ff0
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Tue Jun 3 08:59:46 2008 -0700

    Add install_initd program
    
    Create the executable install_initd for installing services using Linux
    Standard Base (LSB) headers. It creates symlinks for use in a System-V
    initialization scheme.

commit f7934805253c8ab03d6c0490da167ad5e0375694
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Thu May 29 09:17:30 2008 -0700

    Don't add scripts to the remove list when they're not active
    
    The dep removal logic was always adding the requested services to the
    remove list, causing all links to be rewritten. Now, check if it's
    active before adding it. This means that requesting to remove an
    inactive script will just do nothing.

commit f0640937d2b29aec1d8b35102fbd1155b37f264c
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Thu May 29 09:08:40 2008 -0700

    Actually remove the requested services
    
    Fixed a bug where the removal process didn't actually include the
    requested service in the set to be removed.

commit d9aaecb095a169d619c71ea337bed892ca8449dc
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Thu May 29 08:52:12 2008 -0700

    Use two fields for storing installation/removal status
    
    Previously, there was a single change field cstart/stop that was
    overloaded to contain both installation and removal status. It was
    difficult to differentiate between whether a service was to be removed,
    to be installed, or unchanged.
    
    This commit converts the change field into two dedicated fields,
    instart/stop and rmstart/stop to differentiate the cases better.

commit 20e1c19f9223e2a43e1399009adfa4a39f78e7b6
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Wed May 28 19:05:52 2008 -0700

    verify_level: Don't set changed bits to active
    
    There's no sane way to set the changed bits to active without destroying
    valid deactived levels in some cases. Instead, we just have to rely on
    the fact that they'll be correct already.

commit 60e5cb09b3f38afc768fbd646f2cb58c33defaf9
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Wed May 28 18:40:20 2008 -0700

    Handle rc bits more correctly when installing and removing links
    
    A few changes in the installrm functions:
     - When removing an existing symlink, we clear the active bit for that
       level.
     - When installing a new link, we set the active bit for that level.
     - Before installing a new link, we check that the script is supposed to
       start in that level and that it's not marked for removal.

commit 78d5e1b0c3ee9be8fc71389a57d0637f16b99c97
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Wed May 28 18:39:05 2008 -0700

    Allow easily recreating test links
    
    Added the target links, which cleans the existing rc links and recreates
    them as they are originally.

commit 33d193a4eb5db51c0b6fbda66ed2bdbd564a4015
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Wed May 28 18:37:02 2008 -0700

    Also allow dstart/dstop keys in initd_is_active

commit 84220fa7dce80a7f985e145900489f1f345f8967
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Wed May 28 09:08:53 2008 -0700

    Add function initd_clear_rc and refactor with initd_set_rc
    
    Added the initd_clear_rc function as the complement to initd_set_rc.
    It clears level bits from an rc type in the initd. Refactored the rc_t
    evaluation into a separate function, initd_get_rc_from_key.

commit 624f46bdf8b7fbcd37823b45a4ac7b4422c559a1
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Wed May 28 06:15:32 2008 -0700

    Use changed fields to fix dep solver in remove case
    
    When told to remove services through initd_remove_recurse_deps, their
    changed fields are cleared to indicate that they will no longer be
    available. This is an improvement over the previous hack where the
    active bits were being cleared and then restored at the end of the
    function.
    
    With the changed fields cleared, we can skip services that are currently
    active, but will be going away in add_all_actives. This fixes a bug
    where a service can be asked to be removed, but then added right back in
    because it's currently active.
    
    When each rc level is verified after recursion has completed, the added
    services are checked to see if they are marked for removal. This fixes a
    bug where a service was asked to be removed, but added back because it
    was a dependency of another service. When each service is verified at
    that level, it is marked to change to active.
    
    Using the changed field clearing in remove_recurse_deps and the setting
    in verify_level, we should be able to install and remove scripts just by
    checking the changed field.
    
    Finally, fixed two tests which were passing with false positives due to
    these bugs.

commit 32c69fb74cbc8f881b1e2a65da050281348bc4a8
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Tue May 27 17:52:01 2008 -0700

    Introduce rc change fields, cstart and cstop
    
    To differentiate between currently active rc levels and to-be-changed
    rc levels, new members cstart and cstop have been added to the initd_t
    type. These will be used in the dep solver to test for deps that are
    marked for removal.

commit 36bc7508384796ed94fbc1d1acb137e4e9d70dd5
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Tue May 27 08:29:09 2008 -0700

    initd_is_active: Take key type instead of sk type
    
    Another active field will be added, so we need to allow initd_is_active
    to differentiate between them. Just using the sk type is not enough, so
    now it takes the key name, returning false if an invalid key type was
    passed.

commit ddb55e1039f89df52fccbcc554218b8744b3deeb
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Mon May 26 11:07:21 2008 -0700

    recurse_deps: Return NULL on errors, empty list is not error
    
    The recurse_deps functions are now consistent in returning errors. Since
    there are valid cases where an empty list may be returned, an error is
    only indicated by returning NULL. This means callers of recurse_deps
    must check that the list is not empty before iterating the members.

commit d88f7651c7a4673d7a47a0aa86ab0d2ba12a7378
Merge: 2ecf19e... f59b7ff...
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Thu May 22 18:00:12 2008 -0700

    Merge branch 'master' into add

commit f59b7fff08348532b6181c13862e9d240b5b6fc7
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Thu May 22 17:59:06 2008 -0700

    Don't derefernce members of NULL structures

commit 2ecf19e1ece03ee3f8bde6b5d7d9acbdc40bc597
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Thu May 22 17:46:57 2008 -0700

    Add test case for removing init.d scripts
    
    Test the functionality of removing an active script. Remove definitely
    has some bugs, but the test case is sane.

commit a598f15bf36eb346a08c9580c91f84501fb2d0d5
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Thu May 22 17:38:03 2008 -0700

    Rename tests to more useful names

commit c136a3765efc354080aee77a7a8c64bdccadc0e4
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Thu May 22 09:02:44 2008 -0700

    Add functions for installing and removing init.d symlinks
    
    This adds the initd_installrm_links function and its helpers for
    installing and removing symlinks. The function takes an ordered start or
    kill list and the init.d directory to operate on. There is just a single
    entry point since the determination of removal or addition is done in
    the dependency ordering.

commit 11920a5b64435f869aa920f33c135b7920a4df99
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Tue May 20 18:02:51 2008 -0700

    Move rcpair definitions into separate rc internal header
    
    The rcpair struct and the static instances rcdirs and rcsdirs will be
    reused, so they're moved into a separate internal header.

commit 7bb1fab3c564e937de4d6e81196984d87df8ddc6
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Tue May 20 08:54:15 2008 -0700

    Cache active links when scanning rc?.d directories
    
    When scanning the rc?.d directories to find which services are active,
    we now add paths to the active links in the initd_t astart_links and
    astop_links fields. These paths are relative to the init.d directory,
    e.g., ../rc1.d/S20foo.

commit e83dc0011726c8ae4cfe75f873d38caba968f52f
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Thu May 15 18:37:42 2008 -0700

    New initd members: active start and stop symlinks
    
    When the rc?.d directories are walked, we'd like to cache the names of
    the links in addition to just flagging the active levels. The names can
    be used later when adding or removing links. To this effect, two new
    members have been added to initd_t: astart_links and astop_links.

commit 8855d447e2fc734b84bbf65d76b910863c0037fd
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Fri May 2 10:40:48 2008 -0700

    rdep: Recurse and verify dependencies when removing
    
    Added a new function, initd_remove_recurse_deps, which verifies that the
    dependencies of the active services are still valid if specified
    services are removed. There is a bit of hackery to play with the active
    flags of the to-be-removed services and then restoring them.
    
    A new test program, tremove, has been added to exercise this function.
    It is basically the compliment to tverify (should be tinstall).

commit 657c850522263c5ab204ff9a8378b7092a89b25f
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Thu May 1 18:28:15 2008 -0700

    initd_copy: Also copy active start/kill levels
    
    Forgot to add these before...

commit 83c9a2459ab1105671aa842ac28ed94c946af656
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Thu May 1 08:31:23 2008 -0700

    Rename initd_recurse_deps in preparation for removal
    
    Renamed initd_recurse_deps to initd_add_recurse_deps in anticipation of
    the recursive removal function, initd_remove_recurse_deps.

commit 1286cd4d475bdb1ebae4b2de9718c67c3042b52c
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Thu May 1 08:24:27 2008 -0700

    Change initd_sk_t enum to SK_{START,STOP} to differentiate from RC
    
    Made the enumerations for rc and sk clearer by changing the initd_sk_t
    names to SK_START and SK_STOP.

commit bd23eb51319dd2e7164f8a93593c75dbc0300748
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Thu May 1 08:19:07 2008 -0700

    Set active levels after parsing from scripts
    
    After parsing the init.d directory with initd_list_from_dir, we call
    initd_list_set_actives so it doesn't need to be explicitly called.

commit 89b6784a649b4f111da3c04c358fa8952fd101aa
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Tue Apr 29 19:07:32 2008 -0700

    New test exercising parsing and dep checking
    
    Added a new test, tverify, that combines the parsing and collection of
    scripts in the init.d directory with checking the deps of script. This
    pretty much simulates the first half of install_initd. The missing part,
    of course, is the actual creation of the links.

commit abf1408deb61d9e234b341712c45a993ba78cdd2
Merge: d9c0825... f69b7a9...
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Tue Apr 29 19:05:22 2008 -0700

    Merge branch 'master' into deps

commit f69b7a91120c3c3c302be2ed20076f5704745413
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Tue Apr 29 18:11:56 2008 -0700

    parse: Only convert rc token to integer when it's a single digit
    
    Parsing for the sysinit level in Default-Start/Stop was broken because
    the unconditional atoi() would result in a valid level 0 for any input.
    Now we check that the token is a single digit before converting it and
    skip on to the sysinit checks otherwise.

commit d9c0825f0136116259b2bc23fd91ef8d0ad89200
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Tue Apr 29 08:39:15 2008 -0700

    rdep: Verify the scripts for start/stop at each level
    
    Added new function initd_list_verify_deps, which takes an ordered list
    of deps and verifies that they are valid for starting or stopping at
    each level. Currently, this is just called from initd_recurse_deps.
    
    The test program trdeps has been adjusted to set valid start and stop
    levels to exercise this functionality.

commit 2e0735ae16af6bcab2ba407e3d5c5c75fb344d6f
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Sat Apr 26 15:11:39 2008 -0700

    New utility function initd_rc_level_char
    
    Add the utility function initd_rc_level_char for converting an rc_t to
    a char.

commit e0705b2735d4e172e74449be8a1181d03250e752
Merge: ee5bfc7... b8a0a67...
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Sat Apr 26 14:32:47 2008 -0700

    Merge branch 'master' into deps
    
    Conflicts:
    
    	lib/initd-list.c
    	lib/initd.h

commit b8a0a67d69a7aaa3923071e252195ba66e1d0e58
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Sat Apr 26 14:15:19 2008 -0700

    Constify more functions

commit ee5bfc7b0546bf6918b3c06bdb2fd711702a7eb1
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Thu Apr 24 09:14:11 2008 -0700

    rdep: Operate on provides rather than name
    
    Services depend on each other by their provided services, not by their
    names.

commit 5b5649838f2075ca4b6b3dd066aefd5a0570c632
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Thu Apr 24 08:52:27 2008 -0700

    Move initd_provides into initd.c where it belongs

commit b2310ad50002974943562682077240bbe240100d
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Thu Apr 24 08:45:26 2008 -0700

    Make scripts implicitly provide their names as services
    
    Usually, a script will just provide the services listed in the Provides
    field in the LSB header. However, there may be cases where other scripts
    depend on it by its name, rather than by the service it provides. This
    adds the script's name to its provides member if it is not already
    included. This also solves the problem where we want to add a service by
    name, but the dep solver operates on provided services.

commit 013b9593b525909cad534261b8e0fdc03ec5d196
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Wed Apr 23 18:08:38 2008 -0700

    rdep: Append all active services to the requested services
    
    The final order of the dependencies matters when processing recursively
    as this will eventually determine the order of the S and K links. Since
    this may cause an unchanged link to become out of order when one of its
    dependents changes, we add all currently active services to the
    requested set. This should ensure that the final order is correct.

commit bb8db6eac57b9fcd38ec03716e966e89ccc230db
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Wed Apr 23 18:03:12 2008 -0700

    rdep: Convert to operating on initd lists
    
    The recursive deps function has been converted to operating on initd
    list structures instead of just dep lists. This will help when we start
    considering the "Provides" field instead of just the name.

commit cd134ac07a666c73954aea9c2c789be758e08a38
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Wed Apr 23 08:57:06 2008 -0700

    Add RC_ALL macro to mask all RC levels

commit 4f20fb0a6f7a7f9ab43a35ca22a8b44b5414002e
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Wed Apr 23 08:54:29 2008 -0700

    Add initd_is_active for checking if a script is active
    
    Added the initd_is_active function for checking whether a script is
    active in a given level. A third parameter specifies whether it is a
    start or stop link.

commit 362814368e4d62e8be6a298806450d67c2c08a8c
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Tue Apr 22 18:21:12 2008 -0700

    Add push macros to mirror pop functions
    
    Since push is the opposite of pop, macros have been added to alias the
    various add functions.

commit 3dbea5895f385b138ab85873b36d4150a73cf2f4
Merge: 4d420c5... 29aa1df...
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Tue Apr 22 18:16:39 2008 -0700

    Merge branch 'master' into deps

commit 29aa1dfd5e37fb7b8f761bba88758a243cc51d5e
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Tue Apr 22 18:15:33 2008 -0700

    configure: --enable-werror for setting -Werror with gcc
    
    Added a configure switch --enable-werror for adding -Werror when using
    gcc. This is off by default.

commit 4d420c5328d3a0669574ebb07405fa7e48dad6f0
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Tue Apr 22 18:04:27 2008 -0700

    list: Add function initd_list_pop for removing last element
    
    Added the initd_list_pop function for popping the last list element off
    an initd_list.

commit f82c25cb73cab6c90ef9f58bf9e455af9aaa2589
Merge: 4603d57... 024e08e...
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Tue Apr 22 08:45:10 2008 -0700

    Merge branch 'master' into deps

commit 024e08ec8999560ee0ded68bc6ac9180025f6b12
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Tue Apr 22 08:44:32 2008 -0700

    Remove a stray extern from the definition of initd_set_rc

commit 4603d575c94212e4e77bf7872bcd63a6b40ad902
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Tue Apr 22 08:42:06 2008 -0700

    Refactor finding provided services from initd lists
    
    Added the function initd_list_find_provides, which returns a pointer
    to an initd providing the specified service. initd_list_provides is
    refactored to call initd_list_find_provides and convert the returned
    value to a boolean.

commit b347f84b346e424b51c6cab93f415bc51c24ac13
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Tue Apr 22 08:30:23 2008 -0700

    rdeps: Add function to control verbosity
    
    Add the initd_recurse_set_verbose function for controlling the static
    rdep_verbose boolean.

commit 401270b387e416d37e20bf0bc8500f57b8d47afd
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Tue Apr 22 08:24:51 2008 -0700

    Rename recursive deps test to trdeps

commit bc83b95cc3f95fda806313ab33d96563ed666e84
Merge: d727b5e... 3dfc6a8...
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Tue Apr 22 08:21:47 2008 -0700

    Merge branch 'master' into deps
    
    Conflicts:
    
    	lib/Makefile.am
    	test/.gitignore
    	test/Makefile.am

commit 3dfc6a8c228965abcb4afddc43ae17500d07106e
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Mon Apr 21 09:56:02 2008 -0700

    parse: Delay expensive sysinit level parsing
    
    When parsing the levels from Default-{Start,Stop}, delay the expensive
    string comparisons for the sysinit levels until the end.

commit fc3966f0bae95d389b52e919c9ab34123a5006df
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Thu Apr 17 08:18:32 2008 -0700

    Sanitize sysinit handling
    
    This adds more support for the various names that can be used for the
    sysinit services. These names the case-insensitive variations of "s",
    "si" and "sysinit". This applies to both the rc*.d directory names and
    the service levels in the LSB header. The initd_rc_t enum has been
    changed to RC_S.
    
    Most of the code is unchanged, but the token-to-rc conversion function
    used by the parser has been refactored to handle the sysinit variants
    and to be more robust matching against valid levels.

commit 4386ad534032d46175b65897627cf2fa072b492e
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Wed Apr 16 19:13:53 2008 -0700

    Support finding and setting levels for active scripts
    
    By reading the symlinks in the rc*.d directories, the active levels for
    init scripts can be set. The current API, initd_list_set_actives(), just
    takes an initialized list of initd types and a directory holding them.
    This would be /etc/init.d in most cases as it walks from there up and
    down through the various rc*.d directories, searching for symlinks to
    the init.d directory.
    
    This function needs to be called after parsing the scripts in the init.d
    directory. A test program, tactive, has been added to prove out the
    functionality. More of the functions in lib/active.c could probably be
    made non-static to be more flexible in reading the symlinks, but this is
    good enough for now.

commit e66da51a0a6970ad6768b135b5e0c7dc4ea82b4f
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Wed Apr 9 18:48:20 2008 -0700

    New function initd_set_rc for setting rc levels
    
    Add function initd_set_rc() to abstract setting of the various initd_rc
    start/stop members. Should possibly "add_rc" since we're OR'ing the bits
    together.

commit 0423a2f3f085a07cb60f6f08be25059e20064c3a
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Wed Apr 9 18:34:28 2008 -0700

    Add initd member holding active start/stop levels
    
    Two new members have been added to the initd_t type: astart and astop.
    These will hold flags representing the levels for which the script is
    currently active.

commit 99b8ec3559baccb130037d2e02bbe8f01954a44c
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Wed Apr 9 08:17:42 2008 -0700

    Create test links at build time and fix for $srcdir != $builddir
    
    The links in the rc?.d directories need to be generated at build time
    since we can't distribute symbolic links. Also, if the build directory
    is different than the source directory, the target scripts need to be
    copied to the build directory so that the links are ../init.d/$script.

commit 301a8e2cf03eca00eb0d9ea1d3ca1efaeacb04fd
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Tue Apr 8 08:44:31 2008 -0700

    Test scripts were not being distributed

commit 8f59c6e205a29892bb9ef0ebd75aca4671b647f5
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Tue Apr 8 08:35:22 2008 -0700

    Add symlinks for test scripts
    
    To check whether a script is active in a runlevel, we need to see if
    there are existing symlinks. This adds targets to the test Makefile so
    some symlinks are generated for `make check'.

commit 6830826727e2dc0c3bbe1fc3697f44af41a4c955
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Sat Apr 5 13:23:43 2008 -0700

    More test scripts
    
    Added a few more test scripts including dual-headers, which just makes
    sure that only the first LSB header is read. The mountfs and network
    scripts are there to satisfy the requirements from the existing test
    scripts.

commit d727b5e586a0b63ed69f93dfa20a6090c6f8e018
Merge: 9ace554... 3eb3167...
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Fri Apr 4 15:31:17 2008 -0700

    Merge branch 'strarg2' into deps

commit 3eb3167515e51f89afc9ce4b353d88986bdd8bb6
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Fri Apr 4 15:30:17 2008 -0700

    strarg: Mark strarg_t parameters as const when possible
    
    For some of the strarg functions, were simply iterating over an existing
    strarg_t, so the parameters can be const.

commit 9ace554d3dc772aebcd08729bfa6b6b86c286015
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Thu Apr 3 18:51:59 2008 -0700

    rdep: Support for recursing optional Should-* dependencies
    
    _recurse_deps now checks the sstart and sstop fields for each dep,
    skipping when errors would occur if they were missing from the pool.

commit bb9c8b205651bf9fa63f6da2f78cb7ea1a3e3d59
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Thu Apr 3 18:40:53 2008 -0700

    rdep: Add optional parameter for internal deps recursion
    
    The internal _recurse_deps function now takes a boolean "optional"
    parameter. When it encounters a dependency that is not in the pool, it
    will error only when optional is false. This paves the way for
    processing the Should-Start and Should-Stop fields.

commit 8994a44811f52837dbc9643dc2907d41f4b3dcc6
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Thu Apr 3 18:32:01 2008 -0700

    rdep: Refactor recursion function for multiple callers
    
    Refactored initd_recurse_deps() so that it doesn't store static dep
    types. This allows the function to be called from the top level
    multiple times without magically freeing the static internal dep
    types. There is now a separate internal function, _recurse_deps(),
    which does the actual recursion passing the dep types as arguments.
    initd_recurse_deps is now just a thin wrapper to allocate the needed
    types.

commit 4ee643a8f6173d92746d5a64069d09223f617ee3
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Thu Apr 3 09:00:08 2008 -0700

    Add dependency recursion function initd_recurse_deps()
    
    Added an initial cut at a dependency recursion and ordering function,
    initd_recurse_deps(). This function takes a list of needed deps and
    a pool of initd types. From there, it finds each dep in the pool and
    recurses its required services for the specified start/stop type.
    
    This function has been added in the new rdep.c file. A test program
    has been added to verify functionality.
    
    The implementation needs to be reworked. Due to the use of static dep
    types, the function can only be called once.

commit c82284a1412d3fa587aadf9897921353b587b4bf
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Wed Apr 2 18:08:13 2008 -0700

    Convert deps code to strarg_t changes

commit 698a6085f3a7e757b73cae851527d061faefe09e
Merge: cd94249... 59701f3...
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Wed Apr 2 17:51:36 2008 -0700

    Merge branch 'strarg2' into deps

commit 59701f36342cc1a2467caa2641e60b085db4512d
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Wed Apr 2 17:47:37 2008 -0700

    Convert dep_t and prov_t to strarg types
    
    Rather than duplicating a bunch of code in deps.c and prov.c to handle
    arrays of strings, dep_t and prov_t have been converted to strarg_t.
    Additionally, the functions to handle these types are now just macros
    pointing to the associated strarg functions.
    
    To handle these changes, the strarg functions have been converted to
    actually work on strarg_t's instead of char** directly.
    
    The deps and prov functionality, as well as the other types in struct
    initd, have been moved into the types.h header.

commit 7e096f805d8ae6f2d813859b693e3fe0d3e19f48
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Tue Apr 1 17:54:08 2008 -0700

    strarg: Add getters for strarg_t
    
    Added two accessors for strarg_t to hide its members. The test program
    tstrarg was converted to using a strarg_t. It will look nicer once all
    the strarg_*() functions have been converted to operating on actual
    strarg_t types.

commit 71e0936c5b404d7e493c938105a618266bd51577
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Tue Apr 1 17:31:44 2008 -0700

    prov: Add getter methods for number of provides and provides at index
    
    Like the previous deps commit, add macros prov_get_prov and prov_get_num
    for accessing members of the prov_t type. All users except the internal
    prov_*() functions have been converted to use these accessors.

commit 9b436ad0547bbcca46aba26f03563ae85ff96973
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Tue Apr 1 08:31:37 2008 -0700

    dep: Add getter methods for number of deps and dep at index
    
    Add the macros dep_get_dep and dep_get_num for accessing the number of
    deps and the dep at a specific index. This will help to hide the
    structure of the dep_t.
    
    Converted all the dep_t users except the dep_*() functions to use these
    new macros instead of accessing the members directly.

commit cd942492efca0fa8c48ade36795b07a2c84728c9
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Tue Apr 1 08:22:54 2008 -0700

    WIP: Recursive deps

commit 28f4c25a9aa457ed32cda26e0ee1bc9b6cc80bc3
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Thu Mar 27 08:56:06 2008 -0700

    Add dep_pop wrapper around strarg_pop
    
    Added a dep_pop wrapper API around strarg_pop for dep_t types.

commit fcae0e737240308c2376f0611f453c7e14091b20
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Thu Mar 27 08:49:46 2008 -0700

    Support removing last string from strarg
    
    Added the strarg_pop() function for removing the last string from the
    array. It would be nicer if an arbitrary name or index could be removed,
    but that probably requires a linked list. This should be good enough for
    our purposes.

commit d55f0b7020724189b2b290abb5ee3bbb03b21117
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Thu Mar 27 08:42:17 2008 -0700

    Add dep_exists macro mapping to strarg_exists

commit 837bbb8482981772751e55486b02ee13d4a1ecf6
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Wed Mar 26 18:01:38 2008 -0700

    Convert strarg_exists to a boolean
    
    Also make strarg_exists easier to use.

commit 13ee57f2a5cf2ae9210dc307172e5e70f86766b8
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Wed Mar 26 17:53:22 2008 -0700

    Convert initd_list_exists_name to a boolean
    
    Using a boolean for initd_list_exists_name is a bit easier to
    understand.

commit 7dfd6752c9f9113469a39ff6c8fc5cca948de5da
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Tue Mar 25 08:20:13 2008 -0700

    Skip invalid scripts when parsing
    
    initd_parse() should not return an allocated initd_t if it found that
    the script was not valid. Instead, it returns NULL in this case. Callers
    of initd_parse() such as initd_list_from_dir() have been converted to
    handle the NULL return. Currently, the test of validity is just if the
    file has both the opening and closing tags for the LSB header.

commit 9b55345f207e3e5f605822c0ef5be3ac4581037d
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Tue Mar 25 08:06:20 2008 -0700

    Use test scripts from test/init.d only
    
    The test script for tparse has been removed. Now it will just use the
    one of the scripts in test/init.d that is used by tparse-dir.

commit 56b1141afef62b3f945704557c77b3035117630f
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Tue Mar 25 08:00:58 2008 -0700

    Function to construct an initd list from a directory of scripts
    
    Added the initd_list_from_dir() function. This function takes a
    directory path, reads the scripts in the directory, and returns an
    allocated initd_list_t. A test case has been added to verify the
    operation.

commit a7f0e89d3d7bc2c6f028c9e272a4a4592e1f0285
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Thu Mar 20 10:36:59 2008 -0500

    Set initd_t members from script parser
    
    The parsing code is actually now useful in that it creates an initd_t
    structure and sets the members as it reads the supplied script. The
    initd_parse function has been changed to take a path and return an
    allocated initd_t. The path to the script must be valid. I.e., we no
    longer try to guess the directory. This functionality might be added
    back later at a higher level.
    
    To support setting the various members, a few functions have been added
    to the parsing code. initd_parse_line_tokens takes a line and loops over
    the tokens, adding the values found to the provided keys. This will have
    to validate input later.
    
    The tparse test has been changed to print the values from the allocated
    initd_t.

commit 7ea297eb548f0d6e6be8355245f9cb444df0406e
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Thu Mar 20 10:19:36 2008 -0500

    Missing RC_1 definition
    
    The rc_t enum was missing the definition for RC_1.

commit 856499d26941738ed0b1c64e3a137afcdc570887
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Thu Mar 13 23:07:04 2008 -0700

    autogen.sh script for autotools + configure

commit fcc11be4f122a3eb460b1a5a88ca977524fa0002
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Thu Mar 13 18:21:43 2008 -0700

    Kill off the unused initd deps member
    
    The deps field was just a holdover from the initial simple
    implementation and doesn't correspond to any of the LSB headers.

commit 3214ac53ac561fa9c6e9b9204500feade723d0ee
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Thu Mar 13 18:11:40 2008 -0700

    Exercise new verification code in initd-list tests
    
    Changed the initd-list tests so that it setup the Provides and Required
    fields to exercise initd_list_verify_all.

commit e095f87979579f46c2adbf0aab37a6e84b324e93
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Thu Mar 13 17:51:46 2008 -0700

    Check for Required-* keys in initd_list_verify_all()
    
    Changed initd_list_verify_all() to check that all the services in the
    Required-Start and Required-Stop fields exist. Added functions
    initd_provides and initd_list_provides for checking if a service is
    provided by a script.
    
    Added the initd_verify_deps function for checking the fields of a single
    script. This is called by initd_verify_all for the Required-* fields.

commit b8fb5e139806cf80c699a3c3da5dbd1c0e8784bc
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Wed Mar 12 19:32:06 2008 -0700

    Use autoconf AC_GNU_SOURCE for defining _GNU_SOURCE
    
    Instead of defining _GNU_SOURCE in every source file that needs it, we
    just define it globally in config.h.

commit 11988b44fc68c1020b3cb2eb0f5b349d7eafb8f5
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Wed Mar 12 18:10:49 2008 -0700

    Add common macros in config.h through AC_CONFIG_HEADERS
    
    Instead of passing the macros through the compiler, this adds an auto-
    generated header to include in the sources.

commit a420b06185ddde17c171cc8e5b6fe44bf5edf641
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Wed Mar 12 17:59:00 2008 -0700

    Fix distcheck and pass location of test script to tparse
    
    Fixed `make distcheck'. This required adding missing sources to the lib
    Makefile.am and using a shell script to pass the location of the test
    script to tparse.

commit 17c9b21d67214f3d52d214b31f807fc90d3674ef
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Wed Mar 12 08:32:01 2008 -0700

    Support setting the description fields
    
    Added functions to support setting the short description field as well
    as setting and appending the long description.

commit 792f3fb0f48f26a57900eac086e00d15f54a9f6d
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Tue Mar 11 18:28:33 2008 -0700

    Support adding services for {Required,Should}-{Start,Stop}
    
    Added macros to support adding services needed in the various runlevels.

commit c0ac754bf5db8c91b780dfb8dc8e18eb0bdae898
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Tue Mar 11 17:56:56 2008 -0700

    Support adding names from the Provides field
    
    Add the initd_add_prov macro for adding new services to that the init
    script provides.

commit 212131eade3bcf91a5ab4f4f52898aca09c03af4
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Tue Mar 11 17:43:41 2008 -0700

    Copy all fields in initd_copy
    
    We were only copying the deps field before, making the "copy" less than
    useful.

commit 68240579f4ef4615681e797327649b51227b10fe
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Tue Mar 11 17:28:29 2008 -0700

    Add support for Provides strargs
    
    Copied the deps implementation to add support for the Provides field.
    Someday I'll do this with less code duplication while keeping the struct
    member names I want.

commit b3433ec08176d638cd36b5db1e681923cffac031
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Tue Mar 11 17:26:56 2008 -0700

    strarg: Include <string.h> for strcmp

commit 0cb0b0bb25ad8a1e4e3ceba91299f3e8810606f7
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Tue Mar 11 08:08:51 2008 -0700

    Add all LSB fields to initd_t
    
    Added all the LSB fields to the initd_t and initialized them. The old
    initd->deps field is still there to not break the source, but will be
    eliminated eventually.

commit 15cd8395484c6c35c5acb04f5c4e07229daa24d5
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Tue Mar 4 09:09:19 2008 -0800

    strarg: New boolean function strarg_exists()
    
    Added a new function strarg_exists to search a strarg for an occurrence
    of a given string. If located, the function returns 1. Otherwise, it
    returns 0.

commit d5c9c9cdcc7a2b19dbb2df9548e59ae467b86723
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Thu Feb 28 20:57:15 2008 -0800

    Add a strarg_t type for generic strargs
    
    Whereas the dep_t has a specific purpose with likeminded member name,
    there are also times when a generic strarg is useful. This adds a type
    for these situations, strarg_t.

commit 123cea81154ebf708aca775e8d6af340a5ab8737
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Thu Feb 28 20:08:42 2008 -0800

    Don't dereference pointers pointers into the ether
    
    When printing out the key and value in initd_parse_line(), there was a
    definite possibility of key not being initialized before being
    dereferenced in the printf. This makes their use more robust.

commit 229c77a96458adbd14d9b841f10227a9d71d9dbc
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Thu Feb 28 19:29:25 2008 -0800

    Strip trailing space from key and value and test it
    
    Added the space stripping loop to the handling of the value. Both loops
    were converted to use strlen in the loop instead of pointer values. The
    test script was changed to test for these cases.

commit 7cd081b5379c2fd43b41a6426fafd925a7dad67c
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Thu Feb 28 19:20:27 2008 -0800

    Print value when key is extended description, too
    
    Previously, we were jumping to the return when detecting an extended
    description field. Instead, a print goto is added so we see these
    values.

commit ee304e4111db3cffe8bc8b94340c5a47b3bec504
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Thu Feb 28 18:51:50 2008 -0800

    Parse the script line into key and value pairs
    
    Added the static function initd_parse_line to break the lines in the LSB
    header into key and value pairs. It just prints these at the end of each
    call instead of doing anything useful right now.
    
    There are still issues with the Description field. Some work will have
    to be done to handle this correctly.

commit 65a772cb016ff61972dd579f82d169b48b800422
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Thu Feb 28 08:20:18 2008 -0800

    Initial initd script parsing functions
    
    Add initial support for parsing initscripts with initd_parse(). Right
    now it just prints all the lines between the LSB header markers.

commit 9cd15401fa5f3879283d019946f72c6bfae22b00
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Wed Feb 27 09:00:15 2008 -0800

    Add test files to test/.gitignore

commit cccf2ca1707a156e5479f341842c7c72d05a1857
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Wed Feb 27 08:52:50 2008 -0800

    Run test programs from `make check'
    
    Rather than declaring the test programs as noinst, they are configured
    to be built and run from `make check'.

commit 3c052ed8e41f4b95fa701a6e5d6568163745a753
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Wed Feb 27 08:49:07 2008 -0800

    Move sources to separate lib and test subdirectories
    
    The top directory was getting cluttered with sources for different
    things, so they've been moved to more accurate subdirectories. The
    libinitd sources are in the lib directory, and the test programs are in
    the test directory.

commit 0c41102a552f2716dc30f05aee3b284da237d885
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Tue Feb 26 17:59:05 2008 -0800

    dep: Use strarg functions for the dep_t
    
    To handle the char** member in the dep_t, we use the strarg functions.

commit cb17496ad23f91822179356f0b85f21346fae6ee
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Tue Feb 26 17:57:33 2008 -0800

    str: Return pointer to (possibly new) char* from d_string_append
    
    Since the reallocated memory for the string passed to d_string_append()
    may have moved, we return a pointer to this memory.

commit 18e6919c8085c436111d3966be31a10c29f602e2
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Tue Feb 26 17:50:25 2008 -0800

    strarg: Return pointer to (possibly new) char** in strarg_add()
    
    Since we reallocate the memory for the char** passed to strarg_add, we
    must pass back a pointer to this memory since it may have changed
    location.

commit 9329fcfd6d4b5c1403095553be340fe2b89a747f
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Fri Feb 22 18:25:06 2008 -0800

    Return of the strarg functions
    
    After realizing that there would be more uses of dynamic string arrays
    than just dep_t, it was decided that the strarg would be resurrected.
    The difference now is that there is no strarg structure. Instead, the
    caller must supply the necessary types to the functions. This allows
    for flexibility in how the strargs are used.

commit 23bcb6958f39f0c89708958b91222b9bd07f2206
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Thu Feb 21 18:51:00 2008 -0800

    Major refactoring to an initd script handling tool
    
    Renamed the project to initd-tools. Refactored the code to reflect that
    the main type is an init script with associated dependencies. The strarg
    type was converted to the dep type as this is really the only spot where
    we use dynamic string arrays.

commit 94eb31234c32074ae4811ae369077ba86fbb96c4
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Thu Feb 21 17:43:15 2008 -0800

    Convert the dep_t deps member to use a strarg
    
    The dep_t deps and ndeps members have been converted to using a strarg
    to encapsulate their data. Using the strarg API, handling of the deps
    is much simpler and easier to read.

commit fbd88971760279aa1f1b4f208450e9b9cc5e69b4
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Thu Feb 21 08:44:35 2008 -0800

    Function and test for copying a strarg
    
    Added the function strarg_copy() to make a copy of an existing strarg_t.

commit 50ddb78acc72f4991ffc72c380d9ba5ac34d646d
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Thu Feb 21 08:31:19 2008 -0800

    New type strarg for handling dynamic arrays of strings
    
    Added a new type and API for handling dynamic arrays of strings. The new
    structure, strarg, contains a char** member as well as a count member. A
    test case has been added for creating and freeing this type.

commit 50503444864518f98d4c8f7b92047ce72561fce3
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Wed Feb 20 18:37:58 2008 -0800

    Function to verify all the sub-dependencies are defined in a list
    
    When working with a list of deps, it's important to know that all the
    sub-dependencies have an associated dep_t of the same name in the list.
    This means that we can easily find that ordering the deps won't result
    stop in an undefined reference.
    
    A new test program has been created for this function.

commit 004e5539f82cc780d41fa4f012ccf98e1e75e2ee
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Wed Feb 20 09:09:25 2008 -0800

    Boolean type functions for checking existence of dependencies
    
    Added two iterating functions that return 0 when they succeed finding a
    named dependency. This is more convenient when we just want to verify
    data.

commit d29d183e4a6f9dfbdff9a9cf8bba6c8faf42a215
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Wed Feb 20 08:46:00 2008 -0800

    Remove the mostly useless dep_grow function
    
    Since we don't track the actual allocations, it doesn't make a lot of
    sense to allow the deps dynamic array to grow by a variable number of
    slots. Instead, dep_add() always just adds a single slot and sets the
    terminating pointer to NULL.

commit 6153e2a9c44d556f188405055286aac3eaf33162
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Wed Feb 20 08:38:59 2008 -0800

    Use d_string_free function where possible
    
    Make use of the d_string_free function in dep_free to handle any extra
    actions such as setting the pointer to NULL. Also set dep->deps to NULL
    in case the dep_t is reused.

commit 593a27e478379f1d703b36ecd8b3389be9103879
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Wed Feb 20 08:36:14 2008 -0800

    Add compiler warnings when using GCC

commit c4ee440854a72413fb5b02644dd34eff207fd7ca
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Tue Feb 19 15:23:32 2008 -0800

    Remove prototype for unused function

commit 9005a577d06ac7c795cafa30a3813622c212d92a
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Thu Feb 14 17:30:28 2008 -0800

    Add function for locating a named dep in a dep list
    
    Added the function dep_list_find_name() for locating a named dependency
    in a list. This function return a pointer to the dep or NULL if not
    found.

commit d3f8d57d9c0302dccdf4866271057763abb30cf8
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Thu Feb 14 08:36:05 2008 -0800

    Add function to copy dep_list_t structures
    
    Added the dep_list_copy() function to copy a dep_list_t structure and
    its members and return a new dep_list_t. This should (hopefully) result
    in two independent lists that can be manipulated as necessary.

commit 1bd9266d306dda3ccf7532668e453ea125ff75f9
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Thu Feb 14 08:21:39 2008 -0800

    Add function to copy dep_t structures
    
    Added the dep_copy() function to copy a dep_t structure and its members
    and return a new dep_t.

commit 955bdd008058581b4cd2fc8163f38c8b3341aa95
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Thu Feb 14 08:04:58 2008 -0800

    Initialize the correct structure in dep_list_new()
    
    We actually want to initialize the list, not the dep in dep_list_new().

commit 93956324736df48d82601cfa7d23c4cf70744d5c
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Wed Feb 13 18:51:59 2008 -0800

    Handle null argument in d_string_new
    
    If, for whatever reason, d_string_new is passed a NULL argument, just
    create an empty string.

commit 5a042536bbe6083401e3130fbabc8f1dcc63b0f7
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Wed Feb 13 18:23:07 2008 -0800

    Rename test to tstr
    
    The test program was about testing the d_string functions, so "test" was
    a little too generic.

commit 8cabab121ea255a7cd318bbf4be384643bd9879c
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Wed Feb 13 18:15:45 2008 -0800

    API for dependency lists, move libstr into libdep
    
    Add a beginning API for handling dependency lists, defined in dep.h.
    It's analogous to the dep API.
    
    The libstr library has been removed. Instead, we just add str.c into
    libdep and go from there.

commit 6932559c308b87c00ccf82e5e9c8a33b2f24a8f6
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Wed Feb 13 09:24:29 2008 -0800

    Renamed deps.[ch] to dep.[ch]
    
    To match with the types dep_t and dep_list_t, the source files have
    dropped the plural deps name.

commit e2985df64dd2ebcda93e917043c5a3c17096d628
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Wed Feb 13 09:21:49 2008 -0800

    Add dep_t list pointers and a dep_list_t type
    
    This prepares for using a double linked list of dependencies.

commit 0bb80e0a96bcb1d5e81d9df7f9d942a4df3d373d
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Wed Feb 13 09:16:16 2008 -0800

    Add dependency types and functions and a simple test program
    
    Add a dependency API using the dep struct. This structure contains a
    name string and a NULL terminated array of dependencies. A few accessor
    type functions have been created.

commit 91bee3f907641cd2c6d6547f217fb03eae9e0906
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Tue Feb 12 18:03:53 2008 -0800

    Check that appending an empty string works

commit 7fc96a29f879f314b9c1873d6c0b9d9159543ead
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Tue Feb 12 17:53:20 2008 -0800

    Scratch the d_string_t type, just use char* instead
    
    The d_string structure was pretty illconceived. Just use character
    arrays with the memory handling behind the scenes.
    
    This also begins to use error() in the string library, meaning the
    application will just exit for out of memory conditions.

commit 45363edef0cf238bb6bf1e506244fff377594b29
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Fri Feb 8 16:54:30 2008 -0800

    Add a freeing function for d_strings

commit 436e739424a4d9cd83197e6fff3284c272f6c6ae
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Fri Feb 8 16:15:28 2008 -0800

    Check for errors in memory allocation functions

commit 5dd34c6aeeee55e02df93c8474854607b5f0de1d
Author: Dan Nicholson <dbn.lists@gmail.com>
Date:   Thu Feb 7 08:58:45 2008 -0800

    Initial commit of boring string library and test app
    
    This is a very simple string library, which probably does lots of wrong
    things.
