From fc16e8bff19eaded36ae2833c154394e79c3ffd5 Mon Sep 17 00:00:00 2001 From: steve Date: Sat, 10 Jun 2006 17:04:29 +0000 Subject: [PATCH] 2006-06-10 17:04:28 by steve Moved the role.d into the per-distribution hook directory. --- etc/README | 40 ------------------- etc/role.d/builder | 44 -------------------- etc/role.d/gdm | 61 ---------------------------- etc/role.d/minimal | 80 ------------------------------------- etc/role.d/xdm | 58 --------------------------- hooks/centos4/role.d/README | 6 +++ 6 files changed, 6 insertions(+), 283 deletions(-) delete mode 100644 etc/README delete mode 100755 etc/role.d/builder delete mode 100755 etc/role.d/gdm delete mode 100755 etc/role.d/minimal delete mode 100755 etc/role.d/xdm create mode 100644 hooks/centos4/role.d/README diff --git a/etc/README b/etc/README deleted file mode 100644 index 746318d..0000000 --- a/etc/README +++ /dev/null @@ -1,40 +0,0 @@ - - This directory contains items to be installed in /etc/ upon installation. - The contents are as follows: - - -1. xen-tools.conf ------------------ - - The global configuration file, read by all xen-* scripts. - - -2. hook.d/ ----------- - - The hook directory used by xen-create-image. Each executable - script in this directory will be run in turn as part of the creation - of a new image. - - -3. role.d/ ----------- - - The role directory. - - If the xen-create-image script is invoked with the argument - "--role foo" then the script "foo" in this directory will be - executed as part of the image creation process. - - NOTE: Only one script will be executed. - - These scripts are designed to allow an image creator to have - the ability to easily create different types of images, such - as a "webserver", or a "mailserver". By adding the relevent - role to the commandline a basic image may be customized completely. - - - -Steve --- -$Id: README,v 1.1 2006-01-09 21:11:06 steve Exp $ \ No newline at end of file diff --git a/etc/role.d/builder b/etc/role.d/builder deleted file mode 100755 index 149f1aa..0000000 --- a/etc/role.d/builder +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/sh -# -# Configure the new image to be suitable for compiling Debian packages within -# -# Steve -# -- -# http://www.steve.org.uk/ -# - - -prefix=$1 - - - -# -# This function installs a single package into the chroot, forcing -# the installation to be non-interactive. -# -function install_package -{ - package=$1 - - DEBIAN_FRONTEND=noninteractive chroot ${prefix} /usr/bin/apt-get --yes --force-yes install $package - -} - - - - -# -# Update APT lists. -# -chroot ${prefix} /usr/bin/apt-get update - -# -# Install the packages -# -install_package dpkg-dev -install_package devscripts -install_package fakeroot -install_package debhelper -install_package build-essential -install_package lintian -install_package linda diff --git a/etc/role.d/gdm b/etc/role.d/gdm deleted file mode 100755 index c9f3621..0000000 --- a/etc/role.d/gdm +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/sh -# -# Configure the new image to be a GDM VNC server. -# -# Steve -# -- -# http://www.steve.org.uk/ -# - - -prefix=$1 - - -# -# This function installs a single package into the chroot, forcing -# the installation to be non-interactive. -# -function install_package -{ - package=$1 - - DEBIAN_FRONTEND=noninteractive chroot ${prefix} /usr/bin/apt-get --yes --force-yes install $package - -} - - - - - -# -# Update APT lists. -# -chroot ${prefix} /usr/bin/apt-get update - -# -# Install the packages -# -install_package xserver-xfree86 -install_package vncserver -install_package xfonts-100dpi -install_package xfonts-75dpi -install_package xfonts-base -install_package rxvt -install_package gdm -install_package icewm-experimental - -# -# Add a new section to the GDM configuration file. -# -cat <> ${prefix}/etc/X11/gdm/gdm.conf -[server-VNC] -name=VNC server -command=/usr/bin/Xvnc -geometry 800x600 -depth 24 -flexible=true -EOF - - -# -# Make the new section the default -# -perl -pi.bak -e 's/^0=Standard/0=VNC/g' ${prefix}/etc/X11/gdm/gdm.conf \ No newline at end of file diff --git a/etc/role.d/minimal b/etc/role.d/minimal deleted file mode 100755 index 2d775a9..0000000 --- a/etc/role.d/minimal +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/sh -# -# Configure the new image to be a minimal image, by removing -# a packages I don't care about - and installing some alternatives. -# -# Steve -# -- -# http://www.steve.org.uk/ -# - - -prefix=$1 - - - -# -# This function installs a single package into the chroot, forcing -# the installation to be non-interactive. -# -function install_package -{ - package=$1 - - DEBIAN_FRONTEND=noninteractive chroot ${prefix} /usr/bin/apt-get --yes --force-yes install $package - -} - - -# -# This function removes the given package. -# -function remove_package -{ - package=$1 - - chroot ${prefix} /usr/bin/dpkg --purge ${package} -} - - -# -# Install some new packages - do this first to avoid dependency errors. -# -install_package syslog-ng -install_package deborphan -install_package less -install_package screen -install_package sudo -install_package vim - - -# -# Remove some standard packages. -# - -# PPP stuff. -remove_package pppconfig -remove_package pppoeconf -remove_package pppoe -remove_package ppp -remove_package libpcap0.7 - -# Editors -remove_package nano -remove_package ed -remove_package nvi - -# Syslog -remove_package klogd -remove_package sysklogd - -# manpages -remove_package manpages -remove_package man-db -remove_package info - -# misc -remove_package tasksel -remove_package pciutils -remove_package fdutils -remove_package cpio diff --git a/etc/role.d/xdm b/etc/role.d/xdm deleted file mode 100755 index 4458842..0000000 --- a/etc/role.d/xdm +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/sh -# -# Configure the new image to be a XDM VNC server. -# -# Steve -# -- -# http://www.steve.org.uk/ -# - - -prefix=$1 - - - -# -# This function installs a single package into the chroot, forcing -# the installation to be non-interactive. -# -function install_package -{ - package=$1 - - DEBIAN_FRONTEND=noninteractive chroot ${prefix} /usr/bin/apt-get --yes --force-yes install $package - -} - - - - -# -# Update APT lists. -# -chroot ${prefix} /usr/bin/apt-get update - -# -# Install the packages -# -install_package xserver-xfree86 -install_package vncserver -install_package xfonts-100dpi -install_package xfonts-75dpi -install_package xfonts-base -install_package rxvt -install_package xdm -install_package icewm-experimental - - -# -# Remove the default settings. -# -rm ${prefix}/etc/X11/xdm/Xserver -rm ${prefix}/etc/X11/xdm/Xservers - -# -# Setup XDM to use the VNC server we installed. -# -/bin/echo ':0 /usr/bin/Xvnc /usr/bin/Xvnc -geometry 1024x768 -depth 24' > \ - ${prefix}/etc/X11/xdm/Xservers diff --git a/hooks/centos4/role.d/README b/hooks/centos4/role.d/README new file mode 100644 index 0000000..86d2dd6 --- /dev/null +++ b/hooks/centos4/role.d/README @@ -0,0 +1,6 @@ + +Role Directory for CentOS4 + + +Steve +-- \ No newline at end of file