Changeset 983


Ignore:
Timestamp:
Feb 19, 2008, 1:20:07 PM (10 years ago)
Author:
dkg
Message:

vblade-persist: switch to runit version 1.8.0 (using update-service instead of /var/service explicitly); allow export of regular files, not just block devices.

Location:
trunk/vblade-persist
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/vblade-persist/debian/changelog

    r736 r983  
     1vblade-persist (0.5-1) unstable; urgency=low
     2
     3  * vblade-persist: use runit's update-service program to add/remove the
     4    vblade-persist services, instead of dealing with symlinks in /var/service/
     5    directly (closes: #466376).  Thanks, Gerrit Pape.
     6  * debian/control: Depends: runit (>= 1.8.0-2) (1st version that provides
     7    the update-service program).
     8  * debian/control: prefer iproute to net-tools in Recommends:
     9  * allow exporting regular files, not just block devices, since the
     10    underlying vblade seems to allow it.
     11
     12 -- Daniel Kahn Gillmor <dkg-debian.org@fifthhorseman.net>  Mon, 18 Feb 2008 11:44:27 -0500
     13
    114vblade-persist (0.4-4) unstable; urgency=low
    215
  • trunk/vblade-persist/debian/control

    r736 r983  
    1212Section: admin
    1313Priority: optional
    14 Depends: vblade, runit
    15 Recommends: net-tools | iproute
     14Depends: vblade, runit (>= 1.8.0-2)
     15Recommends: iproute | net-tools
    1616Description: create/manage supervised AoE exports
    1717 This framework uses runit to supervise permanent exports of AoE block
  • trunk/vblade-persist/vblade-persist

    r712 r983  
    1313# Where do the vblade-{run,finish,logrun} scripts live?
    1414SDIR=/usr/share/vblade-persist
    15 
    16 # The directory monitored by runit:
    17 RUNITDIR=/var/service
    1815
    1916usage() {
     
    7673}
    7774
    78 # make sure that the device is either a block device or a link to a
    79 # block device:
     75# make sure that the device is either a block device, a link to a
     76# block device, a regular file, or a link to a regular file:
    8077verify_source() {
    81     [ -b `readlink -f "$1"` ]
     78    [ -b `readlink -f "$1"` ] || [ -f `readlink -f "$1"` ]
    8279}
    8380
     
    114111
    115112    # tell runit to supervise this vblade:
    116     ln -sT "$VDIR/$DNAME" "$RUNITDIR/vblade-$DNAME" || \
     113    update-service --add "$VDIR/$DNAME" vblade-"$DNAME" || \
    117114        fatal "Could not set up supervision for this vblade"
    118115}
     
    129126        fatal "'`basename $DPATH`' is not a vblade-persist-managed export."
    130127   
    131     rm -f "$RUNITDIR/vblade-$DNAME"
     128    update-service --remove "$DPATH" vblade-"$DNAME"
    132129    sv exit "$DPATH"
    133130    rm -rf "$DPATH"
Note: See TracChangeset for help on using the changeset viewer.