installations. * Modify the package to not install all of the configuration files with the execute bit set -- only install the helper scripts that way. * Update the block-file-nbsd script to not blindly try to configure (and often fail to configure) every vnd(4) device until it finds one that works. We now just determine what the next free vnd(4) device is and configure it directly. * Add a netbsd-nbsd script that avoids trying to do all the Linux-specific that just filled the log files with garbage on NetBSD. * Update the vif-bridge-nbsd script to check that the bridge device is configured before using it. * Add clear comments at the top of scripts that can be customized so that the user has enough information to know how to do the customization. * Add a xendomains rc.d script that can be used to start and stop guest domains at system boot- or shutdown-time. Bump the PKGREVISION to 5.
55 lines
1.6 KiB
Bash
55 lines
1.6 KiB
Bash
#!/bin/sh
|
|
#============================================================================
|
|
# $NetBSD: network-nbsd,v 1.1 2005/11/08 00:47:35 jlam Exp $
|
|
#
|
|
# @PKG_SYSCONFDIR@/network
|
|
#
|
|
# Script for starting and stopping the network configuration for the Xen
|
|
# domains. The xend(8) daemon calls a network script when it starts,
|
|
# before any guest domains are started. The xend(8) daemon also calls
|
|
# a network script when it stops. The script name to use is defined in
|
|
# @PKG_SYSCONFDIR@/xend-config.sxp in the ``network-script'' field.
|
|
#
|
|
# Usage: network start|stop|status [var=value ...]
|
|
#
|
|
# Actions:
|
|
# start Create the network configuration for the Xen domains.
|
|
# stop Destroy the network configuration for the Xen domains.
|
|
# status Print some network-related information, e.g. ifconfig
|
|
# and routes.
|
|
#
|
|
# This script may be customized so that the "start" action creates the
|
|
# bridge device(s) to which the guest domains' vifs should connect.
|
|
# However, it is simpler to create any network devices at system startup
|
|
# via /etc/ifconfig.* scripts, e.g. if dom0 has a bge0 device and we wish
|
|
# to create a bridge0 device:
|
|
#
|
|
# /etc/ifconfig.bridge0
|
|
# ------8<------8<------8<------8<------
|
|
# create
|
|
# !brconfig $int add bge0 stp bge0 up
|
|
# ------>8------>8------>8------>8------
|
|
#
|
|
#============================================================================
|
|
|
|
# Exit if anything goes wrong.
|
|
set -e
|
|
|
|
# First arg is the operation.
|
|
OP=$1; shift
|
|
|
|
# Pull variables in args into environment
|
|
for arg ; do export "${arg}" ; done
|
|
|
|
case $OP in
|
|
start|stop|status)
|
|
# Do nothing
|
|
;;
|
|
*)
|
|
echo 'Invalid command: ' $OP
|
|
echo 'Valid commands are: start, stop, status'
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
exit 0
|