1
0
mirror of synced 2026-04-26 12:26:54 +00:00

2006-01-07 21:54:44 by steve

Big changes:  xen-create-image.d has been renamed to hook.d
  There is now support for roles, via role.d - which allows per-role scripts to run.
This commit is contained in:
steve
2006-01-07 21:54:44 +00:00
parent 3d56efdc82
commit f387260654
6 changed files with 271 additions and 31 deletions

62
etc/role.d/gdm Executable file
View File

@@ -0,0 +1,62 @@
#!/bin/sh
#
# Configure the new image to be a GDM VNC server.
#
# Steve
# --
# http://www.steve.org.uk/
#
# $Id: gdm,v 1.1 2006-01-07 21:54:44 steve Exp $
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 <<EOF >> ${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

46
etc/role.d/minimal Executable file
View File

@@ -0,0 +1,46 @@
#!/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/
#
# $Id: minimal,v 1.1 2006-01-07 21:54:44 steve Exp $
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
}
#
# 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.
#
chroot ${prefix} /usr/bin/dpkg --purge ppp pppconf pppoe pppoeconf
chroot ${prefix} /usr/bin/dpkg --purge nano ed nvi klogd sysklogd info

49
etc/role.d/xdm Executable file
View File

@@ -0,0 +1,49 @@
#!/bin/sh
#
# Configure the new image to be a GDM VNC server.
#
# Steve
# --
# http://www.steve.org.uk/
#
# $Id: xdm,v 1.1 2006-01-07 21:54:44 steve Exp $
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
echo ':0 /usr/bin/Xvnc /usr/bin/Xvnc -geometry 1024x768 -depth 24' > ${prefix}/usr/X11R6/lib/X11/xdm/Xservers