Changeset 2624
- Timestamp:
- 10/15/07 13:31:52 (1 year ago)
- Files:
-
- trunk/doc/configuration.xml (modified) (1 diff)
- trunk/gentoo/util-vserver (modified) (1 diff)
- trunk/scripts/vserver.functions (modified) (2 diffs)
- trunk/scripts/vserver.start (modified) (1 diff)
- trunk/scripts/vserver.stop (modified) (1 diff)
- trunk/sysv/util-vserver (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/doc/configuration.xml
r2623 r2624 786 786 </hash> 787 787 </collection> 788 788 789 <collection name="vdevmap"> 790 <collection name="x" type="sybmolic"> 791 <description>'x' is an arbitrary name, replace it with e.g. device names</description> 792 <boolean name="open"> 793 <description>When this file exists, the device can be opened</description> 794 </boolean> 795 <boolean name="create"> 796 <description>When this file exists, the device can be created (if the guest has <optionref ref="bcapabilities">CAP_MKNOD</optionref>)</description> 797 </boolean> 798 <boolean id="guest-vdevmap-remap" name="remap"> 799 <description> 800 When this file exists, <optionref ref="guest-vdevmap-target">target</optionref> will 801 have to exist as well and opening the device will in fact open the target device 802 </description> 803 </boolean> 804 <scalar name="flags"> 805 <description>This file will let you specify unimplemented flags manually</description> 806 </scalar> 807 <scalar name="device"> 808 <description>Contains the name of a device node</description> 809 </scalar> 810 <scalar id="guest-vdevmap-target" name="target"> 811 <description>Contains the device node of the target node to open instead of the device when <optionref ref="guest-vdevmap-remap">remap</optionref> is set</description> 812 </scalar> 813 </collection> 814 </collection> 815 789 816 <collection name="vshelper"> 790 817 <scalar name="sync-timeout"> trunk/gentoo/util-vserver
r2573 r2624 43 43 44 44 ebegin "Loading default device map" 45 $__PKGLIBDIR/bash-wrapper ' loadDeviceMap0 "$__CONFDIR/.defaults/apps/vdevmap"'45 $__PKGLIBDIR/bash-wrapper 'handleDeviceMap --set 0 "$__CONFDIR/.defaults/apps/vdevmap"' 46 46 eend $? 47 47 } trunk/scripts/vserver.functions
r2620 r2624 1283 1283 } 1284 1284 1285 function loadDeviceMap 1286 { 1287 local xid="$1" 1288 local dir="$2" 1285 function handleDeviceMap 1286 { 1287 local op="$1" 1288 local xid="$2" 1289 local dir="$3" 1289 1290 local flags device target 1290 1291 1291 1292 test -d "$dir" || return 0 1293 test -n "$xid" || return 0 1292 1294 1293 1295 for i in "$dir"/*; do … … 1305 1307 ${device:+--device "$device"} ${target:+--target "$target"} ) 1306 1308 1307 $_VDEVMAP --xid "$xid" --set"${vdevmap_opts[@]}" || return $?1309 $_VDEVMAP --xid "$xid" "$op" "${vdevmap_opts[@]}" || return $? 1308 1310 done 1309 1311 } trunk/scripts/vserver.start
r2620 r2624 119 119 enableInterfaces "$VSERVER_DIR" && have_interfaces=1 120 120 121 mountVserver "$VSERVER_DIR" && is_mounted=1 122 prepareInit "$VSERVER_DIR" 123 addtoCPUSET "$VSERVER_DIR" 121 mountVserver "$VSERVER_DIR" && is_mounted=1 122 prepareInit "$VSERVER_DIR" 123 addtoCPUSET "$VSERVER_DIR" 124 125 handleDeviceMap --set "$S_CONTEXT" "$VSERVER_DIR/apps/vdevmap" 124 126 125 127 pushd "$VSERVER_DIR"/vdir/ >/dev/null trunk/scripts/vserver.stop
r2602 r2624 104 104 105 105 execScriptlets "$VSERVER_DIR" "$VSERVER_NAME" post-stop 106 106 107 handleDeviceMap --unset "$S_CONTEXT" "$VSERVER_DIR/apps/vdevmap" 108 107 109 umountVserver "$VSERVER_DIR" || : 108 110 disableInterfaces "$VSERVER_DIR" trunk/sysv/util-vserver
r2513 r2624 63 63 local retval=$? 64 64 _beginResult $"Loading default device map" 65 loadDeviceMap0 "$__CONFDIR/.defaults/apps/vdevmap"65 handleDeviceMap --set 0 "$__CONFDIR/.defaults/apps/vdevmap" 66 66 _endResult $? 67 67 test "$retval" -ne 0 || touch "$lockfile"
