1
0
mirror of synced 2026-05-01 06:08:37 +00:00

2006-06-10 17:06:04 by steve

Added.
This commit is contained in:
steve
2006-06-10 17:06:04 +00:00
parent fc16e8bff1
commit 32791eb1be
5 changed files with 249 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
Role Directory for CentOS4
Steve
--

44
hooks/debian/role.d/builder Executable file
View File

@@ -0,0 +1,44 @@
#!/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

61
hooks/debian/role.d/gdm Executable file
View File

@@ -0,0 +1,61 @@
#!/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 <<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

80
hooks/debian/role.d/minimal Executable file
View File

@@ -0,0 +1,80 @@
#!/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

58
hooks/debian/role.d/xdm Executable file
View File

@@ -0,0 +1,58 @@
#!/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