Compare commits
	
		
			No commits in common. 'master' and 'rocket-config' have entirely different histories. 
		
	
	
		
			master
			...
			rocket-con
		
	
		
	
				 59 changed files with 5314 additions and 1149 deletions
			
			
		@ -1,95 +0,0 @@ | 
				
			|||
# List of tested packages using convert32pkg. | 
				
			|||
# This list is safe to use with massconvert32.sh and safe to install. | 
				
			|||
# Note that these are from slackware 14.2, including patches. -current is unsupported. | 
				
			|||
 | 
				
			|||
# a | 
				
			|||
bzip2 | 
				
			|||
dbus | 
				
			|||
eudev | 
				
			|||
xz | 
				
			|||
 | 
				
			|||
# ap | 
				
			|||
cups | 
				
			|||
mpg123 | 
				
			|||
 | 
				
			|||
# d | 
				
			|||
libtool | 
				
			|||
llvm | 
				
			|||
 | 
				
			|||
# l | 
				
			|||
alsa-lib | 
				
			|||
atk | 
				
			|||
cairo | 
				
			|||
elfutils | 
				
			|||
expat | 
				
			|||
freetype | 
				
			|||
gdk-pixbuf2 | 
				
			|||
glib2 | 
				
			|||
glibc | 
				
			|||
gmp | 
				
			|||
gst-plugins-base | 
				
			|||
gstreamer | 
				
			|||
gtk+2 | 
				
			|||
harfbuzz | 
				
			|||
icu4c | 
				
			|||
lcms2 | 
				
			|||
libexif | 
				
			|||
libffi | 
				
			|||
libgphoto2 | 
				
			|||
libidn | 
				
			|||
libieee1284 | 
				
			|||
libjpeg-turbo | 
				
			|||
libnl3 | 
				
			|||
libpcap | 
				
			|||
libpng | 
				
			|||
libtiff | 
				
			|||
libunistring | 
				
			|||
libusb | 
				
			|||
libxml2 | 
				
			|||
libxslt | 
				
			|||
ncurses | 
				
			|||
orc | 
				
			|||
pango | 
				
			|||
sdl | 
				
			|||
svgalib | 
				
			|||
v4l-utils | 
				
			|||
zlib | 
				
			|||
gamin | 
				
			|||
 | 
				
			|||
# n | 
				
			|||
cyrus-sasl | 
				
			|||
gnutls | 
				
			|||
libgcrypt | 
				
			|||
libgpg-error | 
				
			|||
nettle | 
				
			|||
openldap-client | 
				
			|||
openssl | 
				
			|||
p11-kit | 
				
			|||
 | 
				
			|||
# x | 
				
			|||
fontconfig | 
				
			|||
glu | 
				
			|||
libX11 | 
				
			|||
libXau | 
				
			|||
libXcomposite | 
				
			|||
libXcursor | 
				
			|||
libXdamage | 
				
			|||
libXdmcp | 
				
			|||
libXext | 
				
			|||
libXfixes | 
				
			|||
libXi | 
				
			|||
libXinerama | 
				
			|||
libXrandr | 
				
			|||
libXrender | 
				
			|||
libXv | 
				
			|||
libXvMC | 
				
			|||
libXxf86vm | 
				
			|||
libdrm | 
				
			|||
libpciaccess | 
				
			|||
libxcb | 
				
			|||
libxshmfence | 
				
			|||
mesa | 
				
			|||
pixman | 
				
			|||
 | 
				
			|||
# xap | 
				
			|||
sane | 
				
			|||
@ -1,144 +0,0 @@ | 
				
			|||
#!/bin/sh -e | 
				
			|||
 | 
				
			|||
pkginfodir='/var/log/packages/' | 
				
			|||
pkgscriptdir='/var/log/scripts/' | 
				
			|||
 | 
				
			|||
if [ "$#" -lt 1 ]; then | 
				
			|||
    echo "Usage: $0 <package32> [package64]" 1>&2 | 
				
			|||
    exit 1 | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
pkg32="$(realpath "$1")" | 
				
			|||
unset pkg64 | 
				
			|||
[ "$2" ] && pkg64="$(realpath "$2")" | 
				
			|||
 | 
				
			|||
# Extract all package info | 
				
			|||
# See /sbin/installpkg | 
				
			|||
pkgbase="$(echo "$pkg32" | sed -e 's?.*/??;s/\.t[bglx]z$//')" | 
				
			|||
pkgext="$(echo "$pkg32" | sed -e 's?.*/??;s/.*\.\(t[bglx]z\)$/\1/')" | 
				
			|||
pkgname="$(echo "$pkgbase" | sed -e 's?-[^-]*-[^-]*-[^-]*$??')" | 
				
			|||
pkgver="$(echo "$pkgbase" | sed -e 's?.*-\([^-]*\)-[^-]*-[^-]*$?\1?')" | 
				
			|||
pkgarch="$(echo "$pkgbase" | sed -e 's?.*-[^-]*-\([^-]*\)-[^-]*$?\1?')" | 
				
			|||
pkgbuild="$(echo "$pkgbase" | sed -e 's?.*-[^-]*-[^-]*-\([^-]*\)$?\1?')" | 
				
			|||
 | 
				
			|||
case "$pkgarch" in | 
				
			|||
    i?86) pkgarch=x86_64 ;; | 
				
			|||
    *) | 
				
			|||
        echo "Unsupported package architecture '$pkgarch'. Can't proceed." 1>&2 | 
				
			|||
        exit 1 | 
				
			|||
        ;; | 
				
			|||
esac | 
				
			|||
 | 
				
			|||
pkginfo="$pkginfodir/$pkgname-$pkgver-$pkgarch-$pkgbuild" | 
				
			|||
pkgscript="$pkgscriptdir/$pkgname-$pkgver-$pkgarch-$pkgbuild" | 
				
			|||
 | 
				
			|||
case "$pkgext" in | 
				
			|||
    tgz) tool=gzip ;; | 
				
			|||
    tbz) tool=bzip2 ;; | 
				
			|||
    tlz) tool=lzma ;; | 
				
			|||
    txz) tool=xz ;; | 
				
			|||
esac | 
				
			|||
 | 
				
			|||
temp="$(mktemp -d)" | 
				
			|||
trap "rm -rf '$temp'" EXIT | 
				
			|||
 | 
				
			|||
cd "$temp" | 
				
			|||
explodepkg "$pkg32" | 
				
			|||
 | 
				
			|||
# Remove all files present in the 64bit package | 
				
			|||
if [ "$pkg64" ]; then | 
				
			|||
    echo | 
				
			|||
    echo "Removing files:" | 
				
			|||
    $tool -cd "$pkg64" | tar-1.13 t | grep -v '^install/' | while read -r file; do | 
				
			|||
        echo "./$file" | 
				
			|||
        rm -f "./$file" 2> /dev/null || true | 
				
			|||
    done | 
				
			|||
else | 
				
			|||
    if [ ! -f "$pkginfo" ]; then | 
				
			|||
        echo "Package '$pkgname-$pkgver-$pkgarch-$pkgbuild' is not installed. Can't proceed." 1>&2 | 
				
			|||
        exit 1 | 
				
			|||
    fi | 
				
			|||
 | 
				
			|||
    # See /sbin/removepkg | 
				
			|||
    if fgrep './' "$pkginfo" 1> /dev/null 2>&1; then | 
				
			|||
        TRIGGER='^\.\/' | 
				
			|||
    else | 
				
			|||
        TRIGGER='FILE LIST:' | 
				
			|||
    fi | 
				
			|||
 | 
				
			|||
    echo | 
				
			|||
    echo 'Removing files:' | 
				
			|||
    sed -n "/$TRIGGER/,/^$/p" "$pkginfo" | fgrep -v 'FILE LIST:' | grep -v '^install/' | while read -r file; do | 
				
			|||
        echo "./$file" | 
				
			|||
        rm -f "./$file" 2> /dev/null || true | 
				
			|||
    done | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Clean empty directories | 
				
			|||
echo | 
				
			|||
echo 'Empty directories:' | 
				
			|||
find . -type d -empty -print -delete | 
				
			|||
 | 
				
			|||
# Remove all symlinks present in the 64bit package | 
				
			|||
if [ -f install/doinst.sh ]; then | 
				
			|||
    if [ "$pkg64" ]; then | 
				
			|||
        if ! $tool -cd "$pkg64" | tar-1.13 xO install/doinst.sh > install/doinst.64; then | 
				
			|||
            echo "Failed to extract install/doinst.sh from '$pkg64'. Can't proceed." 1>&2 | 
				
			|||
            exit 1 | 
				
			|||
        fi | 
				
			|||
    else | 
				
			|||
        if [ ! -f "$pkgscript" ]; then | 
				
			|||
            echo "Package '$pkgname-$pkgver-$pkgarch-$pkgbuild' is installed but has no installation script. Can't proceed." 1>&2 | 
				
			|||
            exit 1 | 
				
			|||
        fi | 
				
			|||
        cp "$pkgscript" install/doinst.64 | 
				
			|||
    fi | 
				
			|||
 | 
				
			|||
    # There's some packages that need special treatment | 
				
			|||
    if [ "$pkgname" = 'glib2' -o "$pkgname" = 'cups' -o "$pkgname" = 'sane' ]; then | 
				
			|||
        sed -i -e '/^for file in/,/^done/d' install/doinst.sh | 
				
			|||
    fi | 
				
			|||
    if [ "$pkgname" = 'cups' ]; then | 
				
			|||
        sed -i -e '/^if \[ -e etc\/rc.d\/rc.cups \]; then/,/^fi/d' install/doinst.sh | 
				
			|||
    fi | 
				
			|||
    if [ "$pkgname" = 'eudev' ]; then | 
				
			|||
        sed -i -e '/^if \[ \(-e etc\/rc.d\/rc.udev\|-r etc\/rc.d\/rc.udev.new\) \]; then/,/^fi/d' install/doinst.sh | 
				
			|||
    fi | 
				
			|||
    if [ "$pkgname" = 'dbus' ]; then | 
				
			|||
        sed -i -e '/^if \[ \(-e etc\/rc.d\/rc.messagebus\|-r etc\/rc.d\/rc.messagebus.new\) \]; then/,/^fi/d' install/doinst.sh | 
				
			|||
    fi | 
				
			|||
 | 
				
			|||
    # Extract all lines treating with symlinks or config files. See /sbin/removepkg | 
				
			|||
    sed -n -e 's,^[ ]*( [ ]*cd[ ]* .* [ ]*; [ ]*\(rm\|ln\) [ ]*-\(rf\|sf\)[ ]* .* [ ]*)[ ]*$,&,p' \ | 
				
			|||
           -e 's,^[ ]*config .*[ ]*$,&,p' install/doinst.64 > install/doinst | 
				
			|||
    rm install/doinst.64 | 
				
			|||
 | 
				
			|||
    echo | 
				
			|||
    echo 'Removed lines in doinst.sh:' | 
				
			|||
    if [ -s install/doinst ]; then | 
				
			|||
        fgrep -xf install/doinst install/doinst.sh || true | 
				
			|||
 | 
				
			|||
        # Remove all symlinks present in the 64bit package | 
				
			|||
        fgrep -vxf install/doinst install/doinst.sh > install/doinst.sh.new || true | 
				
			|||
        mv install/doinst.sh.new install/doinst.sh | 
				
			|||
 | 
				
			|||
        # If the resulting doinst.sh is empty, remove it. | 
				
			|||
        if [ ! -s install/doinst.sh ]; then | 
				
			|||
            rm install/doinst.sh | 
				
			|||
        fi | 
				
			|||
    fi | 
				
			|||
    rm install/doinst | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Rename package in slack-desc | 
				
			|||
if [ -f install/slack-desc ]; then | 
				
			|||
    sed -i -e '/^\$\|#\| *|/!s/^[^:]*:/convert32-&/' install/slack-desc | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
if ! find . | grep -v '^.$\|^./install' > /dev/null; then | 
				
			|||
    echo | 
				
			|||
    echo 'Package is empty. Not running makepkg.' 1>&2 | 
				
			|||
    exit 0 | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
makepkg -l n -c n "$OLDPWD/convert32-$pkgname-$pkgver-$pkgarch-$pkgbuild.$pkgext" | 
				
			|||
@ -1,229 +0,0 @@ | 
				
			|||
#!/bin/sh | 
				
			|||
set -e | 
				
			|||
 | 
				
			|||
# This is a SlackBuild script for building as-original-as-possible kernel packages. | 
				
			|||
# It combines existing SlackBuilds and other files in the slackware source tree with vanilla SlackBuild conventions in a way that is clean and functional. | 
				
			|||
# Unlike the "official" method of building a Slackware kernel, it builds and installs everything in $TMP, so it doesn't taint the host system, and you can build it as a regular user under fakeroot, if you wanted to. | 
				
			|||
# This often means that the $PKG directory is used as an intermediate directory to run a SlackBuild in, and that said SlackBuilds may need to be modified to run properly in $PKG. | 
				
			|||
 | 
				
			|||
# This script is tailored for x86_64. i?86 support is untested, and would need more modifications (such as building the -smp kernels and fixing $TMP in the packaging SlackBuilds). | 
				
			|||
# Other architectures can be added, provided the source tree for them is anywhere close to the original slackware tree. | 
				
			|||
 | 
				
			|||
# This SlackBuild should be placed in the "source/k" directory of the source DVD. | 
				
			|||
# However, this directory doesn't contain all the files we need, as they're scattered all throughout the slackware tree. | 
				
			|||
 | 
				
			|||
# This code may help prepare the source directory: | 
				
			|||
if [ "$1" = prepare ]; then | 
				
			|||
    shift | 
				
			|||
 | 
				
			|||
    if [ $# -lt 3 ]; then | 
				
			|||
        echo Usage: $0 prepare \<source\> \<install\> \<output\> 1>&2 | 
				
			|||
        echo e.g. $0 prepare /mnt/tmp/slackware-14.2-source-dvd/source /mnt/tmp/slackware64-14.2-install-dvd/slackware64 ./kernel 1>&2 | 
				
			|||
        exit 1 | 
				
			|||
    fi | 
				
			|||
 | 
				
			|||
    SOURCE=$1 | 
				
			|||
    INSTALL=$2 | 
				
			|||
    OUT=$3 | 
				
			|||
 | 
				
			|||
    # Copy the "source/k" directory | 
				
			|||
    cp -aT $SOURCE/k $OUT | 
				
			|||
 | 
				
			|||
    # Copy the "source/d/kernel-headers" and "source/a/kernel-firmware" directories into it | 
				
			|||
    cp -at $OUT $SOURCE/d/kernel-headers $SOURCE/a/kernel-firmware | 
				
			|||
 | 
				
			|||
    # Copy "slackware*/k/kernel-source-*-noarch-*.txt" to use as slack-desc for kernel-source into it | 
				
			|||
    mkdir -p $OUT/kernel-source | 
				
			|||
    cp -aT $INSTALL/k/kernel-source-*-noarch-*.txt $OUT/kernel-source/slack-desc | 
				
			|||
 | 
				
			|||
    # Copy the SlackBuild | 
				
			|||
    cp -at $OUT $0 | 
				
			|||
 | 
				
			|||
    exit | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
PKGNAM=${PKGNAM:-linux} | 
				
			|||
BASEVER=${BASEVER:-4.4.14} | 
				
			|||
VERSION=${VERSION:-$BASEVER} | 
				
			|||
ARCH=${ARCH:-x86_64} | 
				
			|||
KARCH=${KARCH:-x86} | 
				
			|||
BUILD=${BUILD:-1} | 
				
			|||
 | 
				
			|||
CWD=$(pwd) | 
				
			|||
TMP=${TMP:-/tmp/kernel} | 
				
			|||
 | 
				
			|||
NUMJOBS=${NUMJOBS:-" -j7 "} | 
				
			|||
 | 
				
			|||
export VERSION ARCH BUILD TMP | 
				
			|||
 | 
				
			|||
# Extract the kernel source | 
				
			|||
mkdir -p $TMP | 
				
			|||
cd $TMP | 
				
			|||
rm -rf $PKGNAM-$BASEVER $PKGNAM-$VERSION | 
				
			|||
tar xvf $CWD/$PKGNAM-$BASEVER.tar.xz | 
				
			|||
 | 
				
			|||
# Rename the kernel source directory to the proper VERSION | 
				
			|||
# This is useful if you're applying stable patches and the actual VERSION is different from the one the tarball is named after | 
				
			|||
if [ "$BASEVER" != "$VERSION" ]; then | 
				
			|||
    mv $PKGNAM-$BASEVER $PKGNAM-$VERSION | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Apply patches | 
				
			|||
cd $PKGNAM-$VERSION | 
				
			|||
#xzcat $CWD/patch-x.x.xx.xz | patch -p1 --verbose | 
				
			|||
 | 
				
			|||
 | 
				
			|||
# | 
				
			|||
# Build kernel-headers | 
				
			|||
# | 
				
			|||
cd $TMP/$PKGNAM-$VERSION | 
				
			|||
 | 
				
			|||
# Install the kernel headers | 
				
			|||
PKG=$TMP/package-kernel-headers | 
				
			|||
rm -rf $PKG | 
				
			|||
mkdir -p $PKG/usr | 
				
			|||
make $NUMJOBS INSTALL_HDR_PATH=$PKG/usr headers_install | 
				
			|||
 | 
				
			|||
# Apply some modifications that are present in the original kernel-headers package | 
				
			|||
find $PKG/usr -type f -a ! -name '*.h' -delete | 
				
			|||
rm -rf $PKG/usr/include/drm | 
				
			|||
mv $PKG/usr/include/asm $PKG/usr/include/asm-$KARCH | 
				
			|||
ln -sf asm-$KARCH $PKG/usr/include/asm | 
				
			|||
 | 
				
			|||
# Install the slack-desc | 
				
			|||
mkdir -p $PKG/install | 
				
			|||
cat $CWD/kernel-headers/slack-desc > $PKG/install/slack-desc | 
				
			|||
 | 
				
			|||
# Create the package | 
				
			|||
cd $PKG | 
				
			|||
/sbin/makepkg -l y -c n $TMP/kernel-headers-$(echo $VERSION | tr - _)-$KARCH-$BUILD.txz | 
				
			|||
 | 
				
			|||
 | 
				
			|||
# | 
				
			|||
# Build kernel-huge | 
				
			|||
# | 
				
			|||
cd $TMP/$PKGNAM-$VERSION | 
				
			|||
 | 
				
			|||
# Build the kernel image | 
				
			|||
make $NUMJOBS mrproper | 
				
			|||
cat $CWD/config-$ARCH/config-huge-* > .config | 
				
			|||
make $NUMJOBS oldconfig | 
				
			|||
make $NUMJOBS bzImage | 
				
			|||
 | 
				
			|||
# Prepare the directory to run the packaging SlackBuild in | 
				
			|||
PKG=$TMP/kernel-huge | 
				
			|||
rm -rf $PKG | 
				
			|||
mkdir -p $PKG | 
				
			|||
cp arch/$KARCH/boot/bzImage $PKG | 
				
			|||
cp System.map $PKG | 
				
			|||
cp .config $PKG/config | 
				
			|||
 | 
				
			|||
# Copy the packaging SlackBuild | 
				
			|||
cp -aT $CWD/packaging-$ARCH/kernel-huge $PKG | 
				
			|||
 | 
				
			|||
# Run the packaging SlackBuild | 
				
			|||
cd $PKG | 
				
			|||
./kernel-huge.SlackBuild | 
				
			|||
 | 
				
			|||
 | 
				
			|||
# | 
				
			|||
# Build kernel-generic | 
				
			|||
# | 
				
			|||
cd $TMP/$PKGNAM-$VERSION | 
				
			|||
 | 
				
			|||
# Build the kernel image | 
				
			|||
make $NUMJOBS mrproper | 
				
			|||
cat $CWD/config-$ARCH/config-generic-* > .config | 
				
			|||
make $NUMJOBS oldconfig | 
				
			|||
make $NUMJOBS bzImage | 
				
			|||
 | 
				
			|||
# Prepare the directory to run the packaging SlackBuild in | 
				
			|||
PKG=$TMP/kernel-generic | 
				
			|||
rm -rf $PKG | 
				
			|||
mkdir -p $PKG | 
				
			|||
cp arch/$KARCH/boot/bzImage $PKG | 
				
			|||
cp System.map $PKG | 
				
			|||
cp .config $PKG/config | 
				
			|||
 | 
				
			|||
# Copy the packaging SlackBuild | 
				
			|||
cp -aT $CWD/packaging-$ARCH/kernel-generic $PKG | 
				
			|||
 | 
				
			|||
# Run the packaging SlackBuild | 
				
			|||
cd $PKG | 
				
			|||
./kernel-generic.SlackBuild | 
				
			|||
 | 
				
			|||
 | 
				
			|||
# | 
				
			|||
# Build kernel-modules | 
				
			|||
# | 
				
			|||
cd $TMP/$PKGNAM-$VERSION | 
				
			|||
 | 
				
			|||
# Build the kernel modules with the already-present kernel-generic config | 
				
			|||
make $NUMJOBS modules | 
				
			|||
 | 
				
			|||
# Prepare the directory to run the packaging SlackBuild in | 
				
			|||
PKG=$TMP/kernel-modules | 
				
			|||
rm -rf $PKG | 
				
			|||
mkdir -p $PKG | 
				
			|||
make $NUMJOBS INSTALL_MOD_PATH=$PKG modules_install | 
				
			|||
 | 
				
			|||
# Point the build and source links to the proper source directory in /usr/src, as packaged in kernel-source | 
				
			|||
rm -f $PKG/lib/modules/$VERSION/build $PKG/lib/modules/$VERSION/source | 
				
			|||
ln -s /usr/src/$PKGNAM-$VERSION $PKG/lib/modules/$VERSION/build | 
				
			|||
ln -s /usr/src/$PKGNAM-$VERSION $PKG/lib/modules/$VERSION/source | 
				
			|||
 | 
				
			|||
# Copy the packaging SlackBuild | 
				
			|||
cp -aT $CWD/packaging-$ARCH/kernel-modules $PKG | 
				
			|||
 | 
				
			|||
# Prefix absolute module paths in the SlackBuild with $CWD, since we installed the modules there | 
				
			|||
sed -i -e 's@/lib/modules/@$CWD&@' $PKG/kernel-modules.SlackBuild | 
				
			|||
 | 
				
			|||
# Run the packaging SlackBuild | 
				
			|||
cd $PKG | 
				
			|||
KERNELRELEASE=$VERSION ./kernel-modules.SlackBuild | 
				
			|||
 | 
				
			|||
 | 
				
			|||
# | 
				
			|||
# Build kernel-source | 
				
			|||
# | 
				
			|||
cd $TMP/$PKGNAM-$VERSION | 
				
			|||
 | 
				
			|||
# Cleanup the source directory that was prepared and built with the kernel-generic config | 
				
			|||
make $NUMJOBS clean | 
				
			|||
make $NUMJOBS prepare | 
				
			|||
rm .version .config.old | 
				
			|||
 | 
				
			|||
# Install the kernel source | 
				
			|||
PKG=$TMP/package-kernel-source | 
				
			|||
rm -rf $PKG | 
				
			|||
mkdir -p $PKG/usr/src | 
				
			|||
ln -s $PKGNAM-$VERSION $PKG/usr/src/$PKGNAM | 
				
			|||
 | 
				
			|||
# Install the slack-desc | 
				
			|||
mkdir -p $PKG/install | 
				
			|||
cat $CWD/kernel-source/slack-desc > $PKG/install/slack-desc | 
				
			|||
 | 
				
			|||
# Create the package | 
				
			|||
cd $PKG | 
				
			|||
mv $TMP/$PKGNAM-$VERSION usr/src | 
				
			|||
/sbin/makepkg -l y -c n $TMP/kernel-source-$(echo $VERSION | tr - _)-noarch-$BUILD.txz | 
				
			|||
 | 
				
			|||
 | 
				
			|||
# | 
				
			|||
# Build kernel-firmware | 
				
			|||
# | 
				
			|||
cd $TMP | 
				
			|||
 | 
				
			|||
# Prepare the directory to run the packaging SlackBuild in | 
				
			|||
PKG=$TMP/kernel-firmware | 
				
			|||
rm -rf $PKG | 
				
			|||
mkdir -p $PKG | 
				
			|||
cp -aT $CWD/kernel-firmware $PKG | 
				
			|||
 | 
				
			|||
# Use --depth=1 to cause git to not to download the entire history | 
				
			|||
sed -i -e 's/git clone/& --depth=1/' $PKG/kernel-firmware.SlackBuild | 
				
			|||
 | 
				
			|||
# Run the packaging SlackBuild | 
				
			|||
cd $PKG | 
				
			|||
unset VERSION  # The script uses `date` to make a $VERSION | 
				
			|||
./kernel-firmware.SlackBuild | 
				
			|||
@ -1,151 +0,0 @@ | 
				
			|||
#!/bin/sh | 
				
			|||
set -eu | 
				
			|||
 | 
				
			|||
if [ "$(id -u)" != 0 ]; then | 
				
			|||
    echo "This script needs root permissions!" 1>&2 | 
				
			|||
    exit 1 | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
if [ "$#" -lt 2 ]; then | 
				
			|||
    echo "Usage: $0 [-a arch] [-v version] [-m mirror] [-b localmirror]" 1>&2 | 
				
			|||
    exit 1 | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
 | 
				
			|||
version='14.2' | 
				
			|||
arch="$(uname -m)" | 
				
			|||
mirror='https://mirrors.slackware.com/slackware' | 
				
			|||
base='' | 
				
			|||
 | 
				
			|||
# Minimal amount of packages required to run installpkg, removepkg and upgradepkg | 
				
			|||
# bzip2 and gzip are optional, but required to support .tgz and .tbz packages | 
				
			|||
# All of these exist in the 'a' package set | 
				
			|||
packages_pkgtools=' | 
				
			|||
aaa_base | 
				
			|||
aaa_elflibs | 
				
			|||
bash | 
				
			|||
bzip2 | 
				
			|||
coreutils | 
				
			|||
etc | 
				
			|||
findutils | 
				
			|||
glibc-solibs | 
				
			|||
grep | 
				
			|||
gzip | 
				
			|||
pkgtools | 
				
			|||
sed | 
				
			|||
tar | 
				
			|||
util-linux | 
				
			|||
xz | 
				
			|||
' | 
				
			|||
 | 
				
			|||
# Minimal amount of packages required to run slackpkg without the dialog interface | 
				
			|||
# gnupg is optional, but required to verify the GPG signatures of packages | 
				
			|||
# ca-certificates, openssl, bin and perl are optional, but required for HTTPS support | 
				
			|||
# These exist over the 'a', 'ap' and 'n' package sets | 
				
			|||
# perl exists in the 'd' package set | 
				
			|||
# openssl and ca-certificates need to be installed last (after perl and bin, at least) for the doinst.sh to run correctly | 
				
			|||
packages_slackpkg=' | 
				
			|||
bin | 
				
			|||
diffutils | 
				
			|||
gawk | 
				
			|||
gnupg | 
				
			|||
openssl-solibs | 
				
			|||
perl | 
				
			|||
slackpkg | 
				
			|||
wget | 
				
			|||
which | 
				
			|||
 | 
				
			|||
openssl | 
				
			|||
ca-certificates | 
				
			|||
' | 
				
			|||
 | 
				
			|||
# Parse arguments | 
				
			|||
while getopts "v:a:m:b:" opt; do | 
				
			|||
    case "$opt" in | 
				
			|||
        v) version="$OPTARG" ;; | 
				
			|||
        a) arch="$OPTARG" ;; | 
				
			|||
        m) mirror="$OPTARG" ;; | 
				
			|||
        b) base="$(realpath "$OPTARG")"  # Path to local mirror, to get the files from. | 
				
			|||
    esac | 
				
			|||
done | 
				
			|||
 | 
				
			|||
# Build final variables | 
				
			|||
case "$arch" in | 
				
			|||
    x86_64) | 
				
			|||
        pkgmain='slackware64' | 
				
			|||
        ;; | 
				
			|||
 | 
				
			|||
    *) | 
				
			|||
        pkgmain='slackware' | 
				
			|||
        ;; | 
				
			|||
esac | 
				
			|||
release="$pkgmain-$version" | 
				
			|||
initrd='isolinux/initrd.img' | 
				
			|||
checksums='CHECKSUMS.md5' | 
				
			|||
 | 
				
			|||
# Create working directory | 
				
			|||
temp="$(mktemp -d -t "$(basename "$0")".XXXXXX)" | 
				
			|||
trap "rm -rf '$temp'" EXIT | 
				
			|||
destdir="$PWD" | 
				
			|||
cd "$temp" | 
				
			|||
 | 
				
			|||
# Function to download (or copy) a file | 
				
			|||
get() { | 
				
			|||
    if [ "$base" ]; then | 
				
			|||
        cp "$base/$1" "$2" | 
				
			|||
    else | 
				
			|||
        wget "$mirror/$release/$1" -O "$2" | 
				
			|||
    fi | 
				
			|||
} | 
				
			|||
 | 
				
			|||
# Function to verify files based on the checksums file | 
				
			|||
check() { | 
				
			|||
    printf '%s' "$(tail +13 CHECKSUMS.md5 | grep "^[0-9a-f]*  ./$1$" | cut -d ' ' -f 1)  $2" | md5sum -c --quiet - | 
				
			|||
} | 
				
			|||
 | 
				
			|||
# Get the full path to a package | 
				
			|||
package() { | 
				
			|||
    tail +13 CHECKSUMS.md5 | grep "^[0-9a-f]*  ./$pkgmain/[^/]*/$1-[^-]*-[^-]*-[^-]*\.t.z$" | cut -d ' ' -f 3- | cut -c 3- | 
				
			|||
} | 
				
			|||
 | 
				
			|||
# Download checksums | 
				
			|||
get "$checksums" CHECKSUMS.md5 | 
				
			|||
 | 
				
			|||
# Download installer initrd.img | 
				
			|||
get "$initrd" initrd.img | 
				
			|||
check "$initrd" initrd.img | 
				
			|||
 | 
				
			|||
# Unpack and prepare the installer | 
				
			|||
zcat initrd.img | cpio -id | 
				
			|||
rm -rf initrd.img mnt pkg | 
				
			|||
mkdir -p mnt/pkg pkg | 
				
			|||
 | 
				
			|||
# Download packages | 
				
			|||
for pkg in $packages_pkgtools; do | 
				
			|||
    path="$(package "$pkg")" | 
				
			|||
    name="$(basename "$path")" | 
				
			|||
 | 
				
			|||
    get "$path" "pkg/$name" | 
				
			|||
    check "$path" "pkg/$name" | 
				
			|||
    echo "$name" >> pkg/_ | 
				
			|||
done | 
				
			|||
for pkg in $packages_slackpkg; do | 
				
			|||
    path="$(package "$pkg")" | 
				
			|||
    name="$(basename "$path")" | 
				
			|||
 | 
				
			|||
    get "$path" "mnt/pkg/$name" | 
				
			|||
    check "$path" "mnt/pkg/$name" | 
				
			|||
    echo "$name" >> mnt/pkg/_ | 
				
			|||
done | 
				
			|||
 | 
				
			|||
# Bootstrap pkgtools and it's dependencies | 
				
			|||
env -i chroot . sh -l -c 'while read pkg; do /usr/lib/setup/installpkg --root /mnt --terse "/pkg/$pkg"; done < /pkg/_' | 
				
			|||
 | 
				
			|||
# Install slackpkg and it's dependencies | 
				
			|||
env -i chroot mnt sh -l -c 'while read pkg; do /sbin/installpkg --terse "/pkg/$pkg"; done < /pkg/_' | 
				
			|||
 | 
				
			|||
# Configuration | 
				
			|||
printf '%s\n' "$mirror/$release/" >> mnt/etc/slackpkg/mirrors | 
				
			|||
 | 
				
			|||
# Compress the package | 
				
			|||
tar cvJf "$destdir/$release.tar.xz" --sort=name --exclude=./pkg -C mnt . | 
				
			|||
@ -1,63 +0,0 @@ | 
				
			|||
#!/bin/sh -e | 
				
			|||
set -e | 
				
			|||
 | 
				
			|||
if [ "$(id -u)" != 0 ]; then | 
				
			|||
    echo "This script needs root permissions!" 1>&2 | 
				
			|||
    exit 1 | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
if [ "$#" -lt 2 ]; then | 
				
			|||
    echo "Usage: $0 <slackware> <chroot>" 1>&2 | 
				
			|||
    exit 1 | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
slackware="$(realpath "$1")" | 
				
			|||
chroot="$(realpath "$2")" | 
				
			|||
 | 
				
			|||
temp="$(mktemp -d -t makechroot.XXXXXX)" | 
				
			|||
 | 
				
			|||
# Make sure we clean up properly before exitting | 
				
			|||
cleanup() { | 
				
			|||
    mountpoint -q "$temp/mnt" && umount "$temp/mnt" | 
				
			|||
    mountpoint -q "$temp/dvd" && umount "$temp/dvd" | 
				
			|||
    rm -rf "$temp" | 
				
			|||
} | 
				
			|||
trap 'cleanup' EXIT | 
				
			|||
 | 
				
			|||
# Extract the initrd | 
				
			|||
cd "$temp" | 
				
			|||
gzip -cd "$slackware/isolinux/initrd.img" | cpio -id | 
				
			|||
 | 
				
			|||
# Mount the dvd | 
				
			|||
mkdir dvd | 
				
			|||
mount --bind "$slackware" dvd | 
				
			|||
 | 
				
			|||
# Mount the destination | 
				
			|||
mkdir -p "$chroot" | 
				
			|||
mount --bind "$chroot" mnt | 
				
			|||
 | 
				
			|||
# Install the packages | 
				
			|||
env -i chroot . sh -l -c ' | 
				
			|||
/usr/lib/setup/installpkg --root /mnt --terse /dvd/slackware*/*/*.t?z | 
				
			|||
 | 
				
			|||
cd /mnt | 
				
			|||
for script in \ | 
				
			|||
    04.mkfontdir \ | 
				
			|||
    05.fontconfig \ | 
				
			|||
    07.update-desktop-database \ | 
				
			|||
    07.update-mime-database \ | 
				
			|||
    08.gtk-update-icon-cache \ | 
				
			|||
    11.cacerts \ | 
				
			|||
    cups-genppdupdate | 
				
			|||
do | 
				
			|||
    var/log/setup/setup.$script | 
				
			|||
done | 
				
			|||
chroot . /usr/bin/update-gtk-immodules > /dev/null 2>&1 | 
				
			|||
chroot . /usr/bin/update-gdk-pixbuf-loaders > /dev/null 2>&1 | 
				
			|||
chroot . /usr/bin/update-pango-querymodules > /dev/null 2>&1 | 
				
			|||
chroot . /usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas > /dev/null 2>&1 | 
				
			|||
' | 
				
			|||
# We only run a few setup scripts that do not require user interaction, and deal with updating caches and such, which is not done (properly) by the doinst.sh scripts. | 
				
			|||
# To get a full list, run: bzcat MANIFEST.bz2 | awk '{print $6}' | grep '^var/log/setup/setup\.' | sort | 
				
			|||
# Besides the setup scripts, we also need to run some programs which are usually ran from /etc/rc.d/rc.M, but not from the setup scripts. | 
				
			|||
# This is tailored to Slackware 14.2. I'm unsure whether it'll work properly on any other version. | 
				
			|||
@ -1,58 +0,0 @@ | 
				
			|||
#!/bin/sh | 
				
			|||
set -e | 
				
			|||
 | 
				
			|||
# DISCLAIMER | 
				
			|||
# Don't ever think of installing every single package generated with this script. | 
				
			|||
# While it *should* not cause any problems, doing so is simply overkill, untested, and not recommended in the least. | 
				
			|||
 | 
				
			|||
if [ "$#" -lt 2 ]; then | 
				
			|||
    echo "Usage: $0 <slackware> <slackware64> [whitelist]" 1>&2 | 
				
			|||
    exit 1 | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
scriptdir="$(realpath "$(dirname "$0")")" | 
				
			|||
 | 
				
			|||
slackware="$1" | 
				
			|||
slackware64="$2" | 
				
			|||
whitelist="$3" | 
				
			|||
 | 
				
			|||
find "$slackware" -type f -name "*.t?z" -printf '%P\n' | sort | while read -r pkg; do | 
				
			|||
    # See /sbin/installpkg | 
				
			|||
    pkgbase="$(echo "$pkg" | sed -e 's?.*/??;s/\.t[bglx]z$//')" | 
				
			|||
    pkgext="$(echo "$pkg" | sed -e 's?.*/??;s/.*\.\(t[bglx]z\)$/\1/')" | 
				
			|||
    pkgname="$(echo "$pkgbase" | sed -e 's?-[^-]*-[^-]*-[^-]*$??')" | 
				
			|||
    pkgver="$(echo "$pkgbase" | sed -e 's?.*-\([^-]*\)-[^-]*-[^-]*$?\1?')" | 
				
			|||
    pkgarch="$(echo "$pkgbase" | sed -e 's?.*-[^-]*-\([^-]*\)-[^-]*$?\1?')" | 
				
			|||
 | 
				
			|||
    if [ "$whitelist" ]; then | 
				
			|||
        if ! grep -v '^#' "$whitelist" | fgrep -xq "$pkgname"; then | 
				
			|||
            continue | 
				
			|||
        fi | 
				
			|||
    fi | 
				
			|||
 | 
				
			|||
    case "$pkgarch" in | 
				
			|||
        i?86) pkgarch=x86_64 ;; | 
				
			|||
        # Architecture-independent stuff | 
				
			|||
        noarch|fw) continue ;; | 
				
			|||
        # Only kernel-headers uses x86 as pkgarch. That doesn't need conversion. | 
				
			|||
        x86) continue ;; | 
				
			|||
        *) | 
				
			|||
            echo "WARNING: Package '$pkg' has an unsupported architecture: '$pkgarch'" | 
				
			|||
            exit | 
				
			|||
            ;; | 
				
			|||
    esac | 
				
			|||
 | 
				
			|||
    if [ ! -f "$slackware64/$(dirname "$pkg")/$pkgname-$pkgver-$pkgarch-"*".$pkgext" ]; then | 
				
			|||
        echo "WARNING: Package '$pkg' doesn't exist in slackware64, or there were multiple with different build versions." | 
				
			|||
        continue | 
				
			|||
    fi | 
				
			|||
 | 
				
			|||
    rpkg="$(realpath "$slackware/$pkg")" | 
				
			|||
    rpkg64="$(realpath "$slackware64/$(dirname "$pkg")/$pkgname-$pkgver-$pkgarch-"*".$pkgext")" | 
				
			|||
 | 
				
			|||
    mkdir -p "$(dirname "$pkg")" | 
				
			|||
 | 
				
			|||
    ( cd "$(dirname "$pkg")" | 
				
			|||
        "$scriptdir/convert32pkg.sh" "$rpkg" "$rpkg64" | 
				
			|||
    ) | 
				
			|||
done | 
				
			|||
@ -1,188 +0,0 @@ | 
				
			|||
#!/bin/sh | 
				
			|||
set -e | 
				
			|||
 | 
				
			|||
gpgkey='' | 
				
			|||
timestamp="$(LC_ALL=C date -u)" | 
				
			|||
cachedir='.cache' | 
				
			|||
 | 
				
			|||
# Cleanup | 
				
			|||
if [ "$1" = 'clean' ]; then | 
				
			|||
    rm -rf "$cachedir" ChangeLog.txt PACKAGES.TXT MANIFEST.bz2 FILELIST.TXT CHECKSUMS.md5 CHECKSUMS.md5.asc GPG-KEY | 
				
			|||
    find . -regex '.*\.t[bglx]z$' | while read -r package; do | 
				
			|||
        pkgbase="$(echo "$package" | sed 's?.*/??;s/\.t[bglx]z$//')" | 
				
			|||
        rm -f "$(dirname "$package")/$pkgbase.txt" | 
				
			|||
        rm -f "$package.asc" | 
				
			|||
    done | 
				
			|||
 | 
				
			|||
    exit | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
mkdir -p "$cachedir" | 
				
			|||
 | 
				
			|||
# Process all packages | 
				
			|||
find . -regex '.*\.t[bglx]z$' | while read -r package; do | 
				
			|||
    case "$package" in | 
				
			|||
        *.tgz) | 
				
			|||
            tool=gzip | 
				
			|||
            ;; | 
				
			|||
        *.tbz) | 
				
			|||
            tool=bzip2 | 
				
			|||
            ;; | 
				
			|||
        *.tlz) | 
				
			|||
            tool=lzma | 
				
			|||
            ;; | 
				
			|||
        *.txz) | 
				
			|||
            tool=xz | 
				
			|||
            ;; | 
				
			|||
    esac | 
				
			|||
 | 
				
			|||
    # See the pkgbase and package_name functions in /sbin/installpkg | 
				
			|||
    pkgbase="$(echo "$package" | sed 's?.*/??;s/\.t[bglx]z$//')" | 
				
			|||
    pkgdir="$(dirname "$package")" | 
				
			|||
    pkgname="$(echo "$pkgbase" | sed 's?-[^-]*-[^-]*-[^-]*$??')" | 
				
			|||
 | 
				
			|||
    pkgtxt="$pkgdir/$pkgbase.txt" | 
				
			|||
    pkgmeta="$cachedir/$pkgdir/$pkgbase.meta" | 
				
			|||
    pkgmanifest="$cachedir/$pkgdir/$pkgbase.manifest" | 
				
			|||
    pkgsize="$cachedir/$pkgdir/$pkgbase.size" | 
				
			|||
    pkgusize="$cachedir/$pkgdir/$pkgbase.usize" | 
				
			|||
 | 
				
			|||
    pkgsum="$cachedir/$pkgdir/$pkgbase.checksum" | 
				
			|||
 | 
				
			|||
    if [ -f "$pkgtxt" -a \ | 
				
			|||
         -f "$pkgmeta" -a \ | 
				
			|||
         -f "$pkgmanifest" -a \ | 
				
			|||
         -f "$pkgsize" -a \ | 
				
			|||
         -f "$pkgusize" -a \ | 
				
			|||
         -f "$pkgsum" ]; then | 
				
			|||
        if [ "$gpgkey" ]; then | 
				
			|||
            if [ -f "$package.asc" ]; then | 
				
			|||
                md5sum --status -c "$pkgsum" && continue | 
				
			|||
            fi | 
				
			|||
        else | 
				
			|||
            md5sum --status -c "$pkgsum" && continue | 
				
			|||
        fi | 
				
			|||
    fi | 
				
			|||
 | 
				
			|||
    echo "Adding $package..." | 
				
			|||
    mkdir -p "$cachedir/$pkgdir" | 
				
			|||
 | 
				
			|||
    # Decompress the package | 
				
			|||
    tmppkg="$(mktemp)" | 
				
			|||
    $tool -cd "$package" > "$tmppkg" | 
				
			|||
 | 
				
			|||
    # Get package size | 
				
			|||
    du -k "$package" | cut -f 1 > "$pkgsize" | 
				
			|||
    du -k "$tmppkg" | cut -f 1 > "$pkgusize" | 
				
			|||
 | 
				
			|||
    # Generate .txt file (see /usr/bin/slackdtxt) | 
				
			|||
    (tar xOf "$tmppkg" install/slack-desc 2> /dev/null || echo "$pkgname:") | egrep -v '^($|#| *\|)' > "$pkgtxt" | 
				
			|||
 | 
				
			|||
    # Create manifest for this package | 
				
			|||
    cat > "$pkgmanifest" << EOF | 
				
			|||
++======================================== | 
				
			|||
|| | 
				
			|||
||   Package:  $package | 
				
			|||
|| | 
				
			|||
++======================================== | 
				
			|||
$(TZ=EST tar tvvf "$tmppkg") | 
				
			|||
 | 
				
			|||
 | 
				
			|||
EOF | 
				
			|||
 | 
				
			|||
    # Create metadata for this package | 
				
			|||
    # Source for the sed line: https://stackoverflow.com/questions/1444406/how-can-i-delete-duplicate-lines-in-a-file-in-unix#1444433 | 
				
			|||
    cat > "$pkgmeta" << EOF | 
				
			|||
PACKAGE NAME:  $(basename "$package") | 
				
			|||
PACKAGE LOCATION:  $pkgdir | 
				
			|||
PACKAGE SIZE (compressed):  $(cat "$pkgsize" | xargs) K | 
				
			|||
PACKAGE SIZE (uncompressed):  $(cat "$pkgusize" | xargs) K | 
				
			|||
PACKAGE DESCRIPTION: | 
				
			|||
$(cat "$pkgtxt" | sed -e '$!N; /^\(.*\)\n\1$/!P; D') | 
				
			|||
 | 
				
			|||
EOF | 
				
			|||
 | 
				
			|||
    # Sign the package | 
				
			|||
    rm -f "$package.asc" | 
				
			|||
    [ "$gpgkey" ] && gpg -bas --use-agent --batch -u "$gpgkey" "$package" | 
				
			|||
 | 
				
			|||
    # Remove decompressed package | 
				
			|||
    rm -f "$tmppkg" | 
				
			|||
 | 
				
			|||
    # Save checksum | 
				
			|||
    md5sum "$package" > "$pkgsum" | 
				
			|||
done | 
				
			|||
 | 
				
			|||
# Generate shitty ChangeLog.txt | 
				
			|||
echo "$timestamp" > ChangeLog.txt | 
				
			|||
 | 
				
			|||
# Create GPG-KEY | 
				
			|||
if [ "$gpgkey" ]; then | 
				
			|||
    gpg --list-keys "$gpgkey" > GPG-KEY | 
				
			|||
    gpg -a --export "$gpgkey" >> GPG-KEY | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Generate PACKAGES.TXT | 
				
			|||
echo "Generating PACKAGES.TXT..." | 
				
			|||
 | 
				
			|||
cat > PACKAGES.TXT << EOF | 
				
			|||
 | 
				
			|||
PACKAGES.TXT;  $timestamp | 
				
			|||
 | 
				
			|||
This file provides details on the Slackware packages found | 
				
			|||
in this directory. | 
				
			|||
 | 
				
			|||
Total size of all packages (compressed):  $(expr \( 0$(find "$cachedir" -type f -name '*.size' | xargs cat | xargs printf ' + %s') \) / 1024 || true) MB | 
				
			|||
Total size of all packages (uncompressed):  $(expr \( 0$(find "$cachedir" -type f -name '*.usize' | xargs cat | xargs printf ' + %s') \) / 1024 || true) MB | 
				
			|||
 | 
				
			|||
 | 
				
			|||
EOF | 
				
			|||
 | 
				
			|||
# https://stackoverflow.com/questions/4255603/sort-files-by-basename#4256095 | 
				
			|||
find "$cachedir" -type f -name '*.meta' | perl -e 'print sort{($p=$a)=~s!.*/!!;($q=$b)=~s!.*/!!;$p cmp$q}<>' | xargs cat >> PACKAGES.TXT | 
				
			|||
 | 
				
			|||
echo >> PACKAGES.TXT | 
				
			|||
 | 
				
			|||
# Generate MANIFEST.bz2 | 
				
			|||
echo "Generating MANIFEST.bz2..." | 
				
			|||
find "$cachedir" -type f -name '*.manifest' | sort | xargs cat | bzip2 -9 -z > MANIFEST.bz2 | 
				
			|||
 | 
				
			|||
# Generate FILELIST.TXT | 
				
			|||
echo "Generating FILELIST.TXT..." | 
				
			|||
 | 
				
			|||
cat > FILELIST.TXT << EOF | 
				
			|||
$timestamp | 
				
			|||
 | 
				
			|||
Here is the file list for this directory.  If you are using a  | 
				
			|||
mirror site and find missing or extra files in the disk  | 
				
			|||
subdirectories, please have the archive administrator refresh | 
				
			|||
the mirror. | 
				
			|||
 | 
				
			|||
EOF | 
				
			|||
find . ! -path "./$cachedir/*" -a ! -name "$cachedir" | sort | xargs fakeroot ls -ld --time-style=long-iso > FILELIST.TXT | 
				
			|||
 | 
				
			|||
# Generate CHECKSUMS.md5 | 
				
			|||
echo "Generating CHECKSUMS.md5..." | 
				
			|||
 | 
				
			|||
cat > CHECKSUMS.md5 << EOF | 
				
			|||
These are the MD5 message digests for the files in this directory. | 
				
			|||
If you want to test your files, use 'md5sum' and compare the values to | 
				
			|||
the ones listed here. | 
				
			|||
 | 
				
			|||
To test all these files, use this command: | 
				
			|||
 | 
				
			|||
tail +13 CHECKSUMS.md5 | md5sum -c --quiet - | less | 
				
			|||
 | 
				
			|||
'md5sum' can be found in the GNU coreutils package on ftp.gnu.org in | 
				
			|||
/pub/gnu, or at any GNU mirror site. | 
				
			|||
 | 
				
			|||
MD5 message digest                Filename | 
				
			|||
EOF | 
				
			|||
find . -type f -a ! -path "./$cachedir/*" | sort | xargs md5sum >> CHECKSUMS.md5 | 
				
			|||
 | 
				
			|||
# Sign CHECKSUMS.md5 | 
				
			|||
rm -f CHECKSUMS.md5.asc | 
				
			|||
[ "$gpgkey" ] && gpg -bas --use-agent --batch -u "$gpgkey" CHECKSUMS.md5 | 
				
			|||
 | 
				
			|||
# Remove tmpdir | 
				
			|||
rm -rf "$tmpdir" | 
				
			|||
@ -1,143 +0,0 @@ | 
				
			|||
#!/bin/sh | 
				
			|||
set -eu | 
				
			|||
 | 
				
			|||
if [ "$(id -u)" != 0 ]; then | 
				
			|||
    echo "This script needs root permissions!" 1>&2 | 
				
			|||
    exit 1 | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
if [ "$#" -lt 1 ]; then | 
				
			|||
    echo "Usage: $0 [-a arch] [-m mirror] <chroot>" 1>&2 | 
				
			|||
    exit 1 | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
 | 
				
			|||
arch="$(uname -m)" | 
				
			|||
mirror='https://mirrors.slackware.com/slackware/slackware64-current' | 
				
			|||
 | 
				
			|||
# Minimal amount of packages required to run installpkg, removepkg, upgradepkg, explodepkg and makepkg | 
				
			|||
# All of these exist in the 'a' package set | 
				
			|||
packages_pkgtools=' | 
				
			|||
aaa_base | 
				
			|||
aaa_elflibs | 
				
			|||
bash | 
				
			|||
coreutils | 
				
			|||
etc | 
				
			|||
findutils | 
				
			|||
glibc-solibs | 
				
			|||
grep | 
				
			|||
pkgtools | 
				
			|||
sed | 
				
			|||
tar | 
				
			|||
util-linux | 
				
			|||
which | 
				
			|||
xz | 
				
			|||
' | 
				
			|||
 | 
				
			|||
# Minimal amount of packages required to run slackpkg without the dialog interface | 
				
			|||
# Supporting https, gpg, and upgrade-all. | 
				
			|||
# These exist over the 'a', 'ap', 'n' and 'l' package sets | 
				
			|||
# ca-certificates needs to be installed after openssl for the doinst.sh to run correctly | 
				
			|||
packages_extra=' | 
				
			|||
bzip2 | 
				
			|||
diffutils | 
				
			|||
gawk | 
				
			|||
gnupg | 
				
			|||
gzip | 
				
			|||
libpsl | 
				
			|||
libunistring | 
				
			|||
pcre2 | 
				
			|||
slackpkg | 
				
			|||
wget | 
				
			|||
 | 
				
			|||
openssl | 
				
			|||
ca-certificates | 
				
			|||
' | 
				
			|||
 | 
				
			|||
# Parse arguments | 
				
			|||
while getopts "a:m:" opt; do | 
				
			|||
    case "$opt" in | 
				
			|||
        a) arch="$OPTARG" ;; | 
				
			|||
        m) | 
				
			|||
            if [ -d "$OPTARG" ]; then | 
				
			|||
                mirror="$(realpath "$OPTARG")" | 
				
			|||
            else | 
				
			|||
                mirror="$OPTARG" | 
				
			|||
            fi | 
				
			|||
            ;; | 
				
			|||
    esac | 
				
			|||
done | 
				
			|||
shift $(expr $OPTIND - 1) | 
				
			|||
[ "$#" -ge 1 ] && [ "$1" = "--" ] && shift | 
				
			|||
 | 
				
			|||
# Build final variables | 
				
			|||
case "$arch" in | 
				
			|||
    x86_64) pkgmain='slackware64' ;; | 
				
			|||
    *) pkgmain='slackware' ;; | 
				
			|||
esac | 
				
			|||
initrd='isolinux/initrd.img' | 
				
			|||
checksums='CHECKSUMS.md5' | 
				
			|||
chroot="$(realpath "$1")" | 
				
			|||
 | 
				
			|||
# Create working directory | 
				
			|||
temp="$(mktemp -d -t "$(basename "$0")".XXXXXX)" | 
				
			|||
cleanup() { | 
				
			|||
    if mountpoint -q "$temp/mnt/pkg"; then | 
				
			|||
        umount "$temp/mnt/pkg" | 
				
			|||
        rmdir "$temp/mnt/pkg" | 
				
			|||
    fi | 
				
			|||
    mountpoint -q "$temp/mnt" && umount "$temp/mnt" | 
				
			|||
    rm -rf "$temp" | 
				
			|||
} | 
				
			|||
trap 'cleanup' EXIT | 
				
			|||
cd "$temp" | 
				
			|||
 | 
				
			|||
# Function to download (or copy) a file | 
				
			|||
get() { | 
				
			|||
    if [ -d "$mirror" ]; then | 
				
			|||
        cp "$mirror/$1" "$2" | 
				
			|||
    else | 
				
			|||
        wget "$mirror/$1" -O "$2" | 
				
			|||
    fi | 
				
			|||
} | 
				
			|||
 | 
				
			|||
# Function to verify files based on the checksums file | 
				
			|||
check() { | 
				
			|||
    printf '%s' "$(tail +13 CHECKSUMS.md5 | grep "^[0-9a-f]*  ./$1$" | cut -d ' ' -f 1)  $2" | md5sum -c --quiet - | 
				
			|||
} | 
				
			|||
 | 
				
			|||
# Get the full path to a package | 
				
			|||
package() { | 
				
			|||
    tail +13 CHECKSUMS.md5 | grep "^[0-9a-f]*  ./$pkgmain/[^/]*/$1-[^-]*-[^-]*-[^-]*\.t.z$" | cut -d ' ' -f 3- | cut -c 3- | 
				
			|||
} | 
				
			|||
 | 
				
			|||
# Download checksums | 
				
			|||
get "$checksums" CHECKSUMS.md5 | 
				
			|||
 | 
				
			|||
# Download installer initrd.img | 
				
			|||
get "$initrd" initrd.img | 
				
			|||
check "$initrd" initrd.img | 
				
			|||
 | 
				
			|||
# Unpack and prepare the installer | 
				
			|||
xz -cd initrd.img | cpio -id | 
				
			|||
rm -f initrd.img | 
				
			|||
mkdir -p pkg "$chroot" | 
				
			|||
mount --bind "$chroot" mnt | 
				
			|||
mkdir -p mnt/pkg | 
				
			|||
mount --bind pkg mnt/pkg | 
				
			|||
 | 
				
			|||
# Download packages | 
				
			|||
for pkg in $packages_pkgtools $packages_extra; do | 
				
			|||
    path="$(package "$pkg")" | 
				
			|||
    name="$(basename "$path")" | 
				
			|||
    get "$path" "pkg/$name" | 
				
			|||
    check "$path" "pkg/$name" | 
				
			|||
done | 
				
			|||
for pkg in $packages_pkgtools; do echo "$(basename "$(package "$pkg")")" >> pkg/__; done | 
				
			|||
for pkg in $packages_extra; do echo "$(basename "$(package "$pkg")")" >> pkg/_; done | 
				
			|||
 | 
				
			|||
# Bootstrap pkgtools and its dependencies | 
				
			|||
env -i chroot . sh -l -c 'while read pkg; do /sbin/installpkg --root /mnt --terse "/pkg/$pkg"; done < /pkg/__' | 
				
			|||
 | 
				
			|||
# Install slackpkg and its dependencies | 
				
			|||
env -i chroot mnt sh -l -c 'while read pkg; do /sbin/installpkg --terse "/pkg/$pkg"; done < /pkg/_' | 
				
			|||
@ -1,63 +0,0 @@ | 
				
			|||
#!/bin/sh -e | 
				
			|||
set -e | 
				
			|||
 | 
				
			|||
if [ "$(id -u)" != 0 ]; then | 
				
			|||
    echo "This script needs root permissions!" 1>&2 | 
				
			|||
    exit 1 | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
if [ "$#" -lt 2 ]; then | 
				
			|||
    echo "Usage: $0 <slackware> <chroot>" 1>&2 | 
				
			|||
    exit 1 | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
slackware="$(realpath "$1")" | 
				
			|||
chroot="$(realpath "$2")" | 
				
			|||
 | 
				
			|||
temp="$(mktemp -d -t makechroot.XXXXXX)" | 
				
			|||
 | 
				
			|||
# Make sure we clean up properly before exitting | 
				
			|||
cleanup() { | 
				
			|||
    mountpoint -q "$temp/mnt" && umount "$temp/mnt" | 
				
			|||
    mountpoint -q "$temp/dvd" && umount "$temp/dvd" | 
				
			|||
    rm -rf "$temp" | 
				
			|||
} | 
				
			|||
trap 'cleanup' EXIT | 
				
			|||
 | 
				
			|||
# Extract the initrd | 
				
			|||
cd "$temp" | 
				
			|||
xz -cd "$slackware/isolinux/initrd.img" | cpio -id | 
				
			|||
 | 
				
			|||
# Mount the dvd | 
				
			|||
mkdir dvd | 
				
			|||
mount --bind "$slackware" dvd | 
				
			|||
 | 
				
			|||
# Mount the destination | 
				
			|||
mkdir -p "$chroot" | 
				
			|||
mount --bind "$chroot" mnt | 
				
			|||
 | 
				
			|||
# Install the packages | 
				
			|||
env -i chroot . sh -l -c ' | 
				
			|||
/sbin/installpkg --root /mnt --terse /dvd/slackware*/*/*.t?z | 
				
			|||
 | 
				
			|||
cd /mnt | 
				
			|||
for script in \ | 
				
			|||
    04.mkfontdir \ | 
				
			|||
    05.fontconfig \ | 
				
			|||
    07.update-desktop-database \ | 
				
			|||
    07.update-mime-database \ | 
				
			|||
    08.gtk-update-icon-cache \ | 
				
			|||
    11.cacerts \ | 
				
			|||
    cups-genppdupdate | 
				
			|||
do | 
				
			|||
    var/lib/pkgtools/setup/setup.$script | 
				
			|||
done | 
				
			|||
chroot . /usr/bin/update-gtk-immodules > /dev/null 2>&1 | 
				
			|||
HOME=/root chroot . /usr/bin/update-gdk-pixbuf-loaders > /dev/null 2>&1 | 
				
			|||
chroot . /usr/bin/update-pango-querymodules > /dev/null 2>&1 | 
				
			|||
chroot . /usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas > /dev/null 2>&1 | 
				
			|||
' | 
				
			|||
# We only run a few setup scripts that do not require user interaction, and deal with updating caches and such, which is not done (properly) by the doinst.sh scripts. | 
				
			|||
# To get a full list, run: bzcat MANIFEST.bz2 | awk '{print $6}' | grep '^var/log/setup/setup\.' | sort | 
				
			|||
# Besides the setup scripts, we also need to run some programs which are usually ran from /etc/rc.d/rc.M, but not from the setup scripts. | 
				
			|||
# This is tailored to Slackware 15.0-current, I'm unsure whether it'll work properly on any other version. | 
				
			|||
@ -0,0 +1,27 @@ | 
				
			|||
#!/bin/sh | 
				
			|||
config() { | 
				
			|||
  NEW="$1" | 
				
			|||
  OLD="$(dirname $NEW)/$(basename $NEW .new)" | 
				
			|||
  ORIGMD5="$2" | 
				
			|||
  # If there's no config file by that name, mv it over: | 
				
			|||
  if [ ! -r $OLD ]; then | 
				
			|||
    mv $NEW $OLD | 
				
			|||
  elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then # toss the redundant copy | 
				
			|||
    rm $NEW | 
				
			|||
  elif [ "$ORIGMD5" ] && [ "$(cat $OLD | md5sum)" = "$ORIGMD5  -" ]; then | 
				
			|||
    mv $OLD $OLD.orig | 
				
			|||
    mv $NEW $OLD | 
				
			|||
  fi | 
				
			|||
  # Otherwise, we leave the .new copy for the admin to consider... | 
				
			|||
} | 
				
			|||
 | 
				
			|||
rmconfig() { | 
				
			|||
  CFG="$1" | 
				
			|||
  ORIGMD5="$2" | 
				
			|||
  if [ -r $CFG ] && [ "$(cat $CFG | md5sum)" = "$ORIGMD5  -" ]; then | 
				
			|||
    mv $CFG $CFG.orig | 
				
			|||
  fi | 
				
			|||
} | 
				
			|||
 | 
				
			|||
rmconfig etc/asound.conf 94423887ed53ea0c17db9f9aeb2a40a6 | 
				
			|||
 | 
				
			|||
@ -1,15 +1,88 @@ | 
				
			|||
This repo contains all my slackware modifications of the base install. | 
				
			|||
Additional packages are contained in RocketLinux and built in a non-standard manner. | 
				
			|||
 | 
				
			|||
This branch contains a few scripts I use, related to slackware. | 
				
			|||
 | 
				
			|||
- kernel.SlackBuild is capable of building a near-identical slackware kernel | 
				
			|||
- convert32pkg.sh converts a 32bit package to be installable on 64bit (by | 
				
			|||
   removing everything present in the 64bit package). | 
				
			|||
  It is only designed to support some packages in the official slackware iso, | 
				
			|||
   because there's all kinds of packages that need special treatment, | 
				
			|||
   especially for their doinst.sh scripts. | 
				
			|||
- massconvert32.sh calls convert32pkg.sh over an entire package directory | 
				
			|||
- update-repo.sh is my shitty implementation of a slackware repo generator, | 
				
			|||
   that tries to generate everything as close to the official slackware repo as | 
				
			|||
   possible. | 
				
			|||
Changes: | 
				
			|||
 | 
				
			|||
/etc/rc.d/rc.M: | 
				
			|||
- Added entry for dhcpcd | 
				
			|||
- Added entry for psd | 
				
			|||
 | 
				
			|||
/etc/rc.d/rc.S: | 
				
			|||
- Removed useless sleep before mounting local filesystems | 
				
			|||
- Create /run/user | 
				
			|||
 | 
				
			|||
/etc/rc.d/rc.6: | 
				
			|||
- Added saving alsa sound state if /etc/rc.d/rc.alsa is executable | 
				
			|||
- Added entry for psd | 
				
			|||
 | 
				
			|||
/etc/rc.d/rc.dhcpcd: | 
				
			|||
- Just run dhcpcd on boot | 
				
			|||
 | 
				
			|||
/etc/rc.d/rc.alsa: | 
				
			|||
/etc/rc.d/rc.dnsmasq: | 
				
			|||
- Just added a newline at the end to differentiate from the original and set the permissions to 755 | 
				
			|||
 | 
				
			|||
/etc/rc.d/rc.psd: | 
				
			|||
- Start the Profile-Sync-Daemon | 
				
			|||
 | 
				
			|||
/etc/profile.d/wheel-path.sh: | 
				
			|||
- Added sbin paths to the PATH for users in the wheel group | 
				
			|||
 | 
				
			|||
/etc/profile.d/unset-less.sh: | 
				
			|||
- Removed LESS variable to fix colors in git log | 
				
			|||
 | 
				
			|||
/etc/profile.d/xdg-runtime-dir.sh: | 
				
			|||
- Create/Set XDG_RUNTIME_DIR properly | 
				
			|||
 | 
				
			|||
/etc/sudoers.d/wheel: | 
				
			|||
- Allow all users in the wheel group to access sudo | 
				
			|||
 | 
				
			|||
/etc/sysctl.d/swappiness.conf: | 
				
			|||
- Set healthy swappiness values for desktop workloads | 
				
			|||
 | 
				
			|||
/etc/udev/rules.d/10-ioscheds.rules: | 
				
			|||
- Give static drives a good scheduler | 
				
			|||
 | 
				
			|||
/etc/udev/rules.d/50-plugdev.rules: | 
				
			|||
- Allow users to access some common external devices | 
				
			|||
 | 
				
			|||
/etc/cron.hourly/psd: | 
				
			|||
- Resync /etc/rc.d/rc.psd on a hourly basis, if enabled | 
				
			|||
 | 
				
			|||
/etc/cron.weekly/fstrim: | 
				
			|||
- Trim any available SSDs on a weekly basis | 
				
			|||
 | 
				
			|||
/etc/slackpkg/slackpkg.conf: | 
				
			|||
- Disable the dialog interface | 
				
			|||
 | 
				
			|||
/etc/slackpkg/blacklist: | 
				
			|||
- List of packages I usually remove from a slackware base install | 
				
			|||
 | 
				
			|||
/etc/fonts/conf.d: | 
				
			|||
/etc/fonts/local.conf: | 
				
			|||
- Make fonts a bit nicer | 
				
			|||
 | 
				
			|||
/etc/dhcpcd.conf: | 
				
			|||
- Removed nohook for wpa_supplicant, to run it on every wireless interface | 
				
			|||
 | 
				
			|||
/etc/dnsmasq.conf: | 
				
			|||
- Set listen-address to 127.0.0.1 to open it up only locally | 
				
			|||
 | 
				
			|||
/etc/ntp.conf: | 
				
			|||
- Uncommented all default NTP servers | 
				
			|||
 | 
				
			|||
/etc/resolv.conf.head: | 
				
			|||
- Set the default nameserver to 127.0.0.1, where dnsmasq should be running | 
				
			|||
 | 
				
			|||
/etc/wpa_supplicant.conf: | 
				
			|||
- Set ctrl_interface_group to netdev, to allow non-root users to connect to the daemon | 
				
			|||
- Allow the config to be updated by the daemon | 
				
			|||
 | 
				
			|||
/etc/X11/xinit/xinitrc.i3: | 
				
			|||
- Added xinitrc file for the i3 window system | 
				
			|||
 | 
				
			|||
/etc/X11/xorg.conf.d/50-synaptics.conf: | 
				
			|||
- Set up my preferred mousepad settings | 
				
			|||
 | 
				
			|||
/usr/share/vim/vimrc: | 
				
			|||
- Don't create backup or undo files | 
				
			|||
 | 
				
			|||
/usr/libexec/slackpkg/functions.d/post-functions.sh: | 
				
			|||
- Adapted the looknew() algorithm to find all the .new files | 
				
			|||
 | 
				
			|||
@ -0,0 +1,54 @@ | 
				
			|||
#!/bin/sh | 
				
			|||
 | 
				
			|||
PKGNAM=rocket-config | 
				
			|||
VERSION=14.2 | 
				
			|||
BUILD=${BUILD:-$(git rev-list HEAD --count)rocket} | 
				
			|||
ARCH=noarch | 
				
			|||
 | 
				
			|||
CWD=$(pwd) | 
				
			|||
TMP=${TMP:-/tmp} | 
				
			|||
PKG=$TMP/package-rocket-config | 
				
			|||
rm -rf $PKG | 
				
			|||
mkdir -p $TMP $PKG | 
				
			|||
 | 
				
			|||
# Install package metadata | 
				
			|||
mkdir -p $PKG/install | 
				
			|||
cat $CWD/slack-desc > $PKG/install/slack-desc | 
				
			|||
cat $CWD/doinst.sh > $PKG/install/doinst.sh | 
				
			|||
 | 
				
			|||
# Install package docs | 
				
			|||
mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION | 
				
			|||
cat $CWD/readme.txt > $PKG/usr/doc/$PKGNAM-$VERSION/readme.txt | 
				
			|||
 | 
				
			|||
# Install all config files | 
				
			|||
find $CWD/root -type f ! -name '*.orig' -printf '%P\n' | while read config; do | 
				
			|||
    case "$config" in | 
				
			|||
        usr/libexec/slackpkg/functions.d/*) | 
				
			|||
            echo Installing /$config | 
				
			|||
            install -Dm644 $CWD/root/$config $PKG/$config | 
				
			|||
            continue | 
				
			|||
    esac | 
				
			|||
 | 
				
			|||
    echo Installing /$config | 
				
			|||
    install -Dm644 $CWD/root/$config $PKG/$config.new | 
				
			|||
 | 
				
			|||
    # Add config lines to doinst.sh | 
				
			|||
    if [ -r $CWD/root/$config.orig ]; then | 
				
			|||
        echo config $config.new $(md5sum $CWD/root/$config.orig | cut -d ' ' -f 1) >> $PKG/install/doinst.sh | 
				
			|||
    else | 
				
			|||
        echo config $config.new >> $PKG/install/doinst.sh | 
				
			|||
    fi | 
				
			|||
done | 
				
			|||
 | 
				
			|||
# Set some special permissions | 
				
			|||
chmod 755 $PKG/etc/rc.d/rc.* \ | 
				
			|||
          $PKG/etc/X11/xinit/* \ | 
				
			|||
          $PKG/etc/profile.d/* \ | 
				
			|||
          $PKG/etc/cron.*/* \ | 
				
			|||
          $PKG/usr/libexec/slackpkg/functions.d/* | 
				
			|||
chmod 750 $PKG/etc/sudoers.d | 
				
			|||
chmod 440 $PKG/etc/sudoers.d/* | 
				
			|||
chmod 600 $PKG/etc/wpa_supplicant.conf.new | 
				
			|||
 | 
				
			|||
cd $PKG | 
				
			|||
/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz | 
				
			|||
@ -0,0 +1,33 @@ | 
				
			|||
#!/bin/sh | 
				
			|||
# $XConsortium: xinitrc.cpp,v 1.4 91/08/22 11:41:34 rws Exp $ | 
				
			|||
 | 
				
			|||
userresources=$HOME/.Xresources | 
				
			|||
usermodmap=$HOME/.Xmodmap | 
				
			|||
sysresources=/etc/X11/xinit/.Xresources | 
				
			|||
sysmodmap=/etc/X11/xinit/.Xmodmap | 
				
			|||
 | 
				
			|||
# merge in defaults and keymaps | 
				
			|||
 | 
				
			|||
if [ -f $sysresources ]; then | 
				
			|||
    xrdb -merge $sysresources | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
if [ -f $sysmodmap ]; then | 
				
			|||
    xmodmap $sysmodmap | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
if [ -f $userresources ]; then | 
				
			|||
    xrdb -merge $userresources | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
if [ -f $usermodmap ]; then | 
				
			|||
    xmodmap $usermodmap | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Start the window manager: | 
				
			|||
if [ -z "$DESKTOP_SESSION" -a -x /usr/bin/ck-launch-session ]; then | 
				
			|||
  exec ck-launch-session /usr/bin/i3 | 
				
			|||
else | 
				
			|||
  exec /usr/bin/i3 | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
@ -0,0 +1,13 @@ | 
				
			|||
Section "InputClass" | 
				
			|||
    Identifier "touchpad" | 
				
			|||
    Driver "synaptics" | 
				
			|||
    MatchDevicePath "/dev/input/event*" | 
				
			|||
    MatchIsTouchpad "on" | 
				
			|||
    Option "TapButton1" "1" | 
				
			|||
    Option "TapButton2" "2" | 
				
			|||
    Option "TapButton3" "3" | 
				
			|||
    Option "VertEdgeScroll" "off" | 
				
			|||
    Option "VertTwoFingerScroll" "on" | 
				
			|||
    Option "HorizEdgeScroll" "off" | 
				
			|||
    Option "HorizTwoFingerScroll" "on" | 
				
			|||
EndSection | 
				
			|||
@ -0,0 +1,40 @@ | 
				
			|||
# Setup: mkdir -p /var/cache/astronaut && chmod a+wt /var/cache/astronaut | 
				
			|||
 | 
				
			|||
dir_build="/tmp/astronaut.$(id -u)/build" | 
				
			|||
dir_install="/tmp/astronaut.$(id -u)/install" | 
				
			|||
dir_source='/var/cache/astronaut' | 
				
			|||
 | 
				
			|||
[ "$(uname -m)" = "x86_64" ] && dir_lib='lib64' | 
				
			|||
dir_sysconf='../etc' | 
				
			|||
dir_localstate='../var' | 
				
			|||
dir_man='man' | 
				
			|||
dir_doc='doc' | 
				
			|||
dir_info='info' | 
				
			|||
 | 
				
			|||
export LDFLAGS="-L/$dir_prefix/$dir_lib" | 
				
			|||
 | 
				
			|||
wrapper_pkgtools_compression='tgz' | 
				
			|||
 | 
				
			|||
options='patch,!gtk3,!pam' | 
				
			|||
package_options() { | 
				
			|||
    case "$1" in | 
				
			|||
        astronaut) echo 'pkgtools,helpers' ;; | 
				
			|||
        i3) echo 'gaps' ;; | 
				
			|||
        python3) echo '!2to3-symlink' ;; | 
				
			|||
        python3-setuptools) echo '!easy_install-symlink' ;; | 
				
			|||
        wine) echo 'wine32=lib' ;; | 
				
			|||
        nxengine-evo) echo 'console_key=-' ;; | 
				
			|||
        qemu) echo 'targets=x86_64-softmmu i386-softmmu' ;; | 
				
			|||
    esac | 
				
			|||
} | 
				
			|||
 | 
				
			|||
export CFLAGS="-march=native -pipe -O2" | 
				
			|||
#export CFLAGS="-march=native -pipe -O3 -fgraphite-identity -ftree-loop-distribution -floop-nest-optimize -flto=$(nproc) -fuse-linker-plugin" | 
				
			|||
#export LDFLAGS="$LDFLAGS $CFLAGS -Wl,--as-needed -Wl,--hash-style=gnu" | 
				
			|||
export CXXFLAGS="$CFLAGS" | 
				
			|||
 | 
				
			|||
export MAKEFLAGS="${MAKEFLAGS:--j $(nproc)}" | 
				
			|||
export WAFFLAGS="$MAKEFLAGS" | 
				
			|||
export BAMFLAGS="$MAKEFLAGS" | 
				
			|||
export NINJAFLAGS="$MAKEFLAGS" | 
				
			|||
export NINJA_STATUS='[%p %f/%t] ' | 
				
			|||
@ -0,0 +1,5 @@ | 
				
			|||
#!/bin/sh | 
				
			|||
# Tell Profile-sync-daemon to resync | 
				
			|||
if [ -x /etc/rc.d/rc.psd ]; then | 
				
			|||
  /etc/rc.d/rc.psd start | 
				
			|||
fi | 
				
			|||
@ -0,0 +1,2 @@ | 
				
			|||
#!/bin/sh | 
				
			|||
fstrim -a | 
				
			|||
@ -0,0 +1,2 @@ | 
				
			|||
# Specify for which interfaces you want dhcpcd to run | 
				
			|||
#IFACES="" | 
				
			|||
@ -0,0 +1,5 @@ | 
				
			|||
# Users for which psd should be enabled | 
				
			|||
#USERS="" | 
				
			|||
 | 
				
			|||
# If $USERS is empty, scan for users that run psd and store them in this file. | 
				
			|||
#USERS_CACHE="/run/psd-users.cache" | 
				
			|||
@ -0,0 +1,44 @@ | 
				
			|||
# A sample configuration for dhcpcd. | 
				
			|||
# See dhcpcd.conf(5) for details. | 
				
			|||
 | 
				
			|||
# Allow users of this group to interact with dhcpcd via the control socket. | 
				
			|||
#controlgroup wheel | 
				
			|||
 | 
				
			|||
# Inform the DHCP server of our hostname for DDNS. | 
				
			|||
hostname | 
				
			|||
 | 
				
			|||
# Use the hardware address of the interface for the Client ID. | 
				
			|||
#clientid | 
				
			|||
# or | 
				
			|||
# Use the same DUID + IAID as set in DHCPv6 for DHCPv4 ClientID as per RFC4361. | 
				
			|||
# Some non-RFC compliant DHCP servers do not reply with this set. | 
				
			|||
# In this case, comment out duid and enable clientid above. | 
				
			|||
duid | 
				
			|||
 | 
				
			|||
# Persist interface configuration when dhcpcd exits. | 
				
			|||
persistent | 
				
			|||
 | 
				
			|||
# Rapid commit support. | 
				
			|||
# Safe to enable by default because it requires the equivalent option set | 
				
			|||
# on the server to actually work. | 
				
			|||
option rapid_commit | 
				
			|||
 | 
				
			|||
# A list of options to request from the DHCP server. | 
				
			|||
option domain_name_servers, domain_name, domain_search, host_name | 
				
			|||
option classless_static_routes | 
				
			|||
# Most distributions have NTP support. | 
				
			|||
option ntp_servers | 
				
			|||
# Respect the network MTU. | 
				
			|||
# Some interface drivers reset when changing the MTU so disabled by default. | 
				
			|||
#option interface_mtu | 
				
			|||
 | 
				
			|||
# A ServerID is required by RFC2131. | 
				
			|||
require dhcp_server_identifier | 
				
			|||
 | 
				
			|||
# Generate Stable Private IPv6 Addresses instead of hardware based ones | 
				
			|||
slaac private | 
				
			|||
 | 
				
			|||
# A hook script is provided to lookup the hostname if not set by the DHCP | 
				
			|||
# server, but it should not be run by default. | 
				
			|||
nohook lookup-hostname | 
				
			|||
 | 
				
			|||
@ -0,0 +1,47 @@ | 
				
			|||
# A sample configuration for dhcpcd. | 
				
			|||
# See dhcpcd.conf(5) for details. | 
				
			|||
 | 
				
			|||
# Allow users of this group to interact with dhcpcd via the control socket. | 
				
			|||
#controlgroup wheel | 
				
			|||
 | 
				
			|||
# Inform the DHCP server of our hostname for DDNS. | 
				
			|||
hostname | 
				
			|||
 | 
				
			|||
# Use the hardware address of the interface for the Client ID. | 
				
			|||
#clientid | 
				
			|||
# or | 
				
			|||
# Use the same DUID + IAID as set in DHCPv6 for DHCPv4 ClientID as per RFC4361. | 
				
			|||
# Some non-RFC compliant DHCP servers do not reply with this set. | 
				
			|||
# In this case, comment out duid and enable clientid above. | 
				
			|||
duid | 
				
			|||
 | 
				
			|||
# Persist interface configuration when dhcpcd exits. | 
				
			|||
persistent | 
				
			|||
 | 
				
			|||
# Rapid commit support. | 
				
			|||
# Safe to enable by default because it requires the equivalent option set | 
				
			|||
# on the server to actually work. | 
				
			|||
option rapid_commit | 
				
			|||
 | 
				
			|||
# A list of options to request from the DHCP server. | 
				
			|||
option domain_name_servers, domain_name, domain_search, host_name | 
				
			|||
option classless_static_routes | 
				
			|||
# Most distributions have NTP support. | 
				
			|||
option ntp_servers | 
				
			|||
# Respect the network MTU. | 
				
			|||
# Some interface drivers reset when changing the MTU so disabled by default. | 
				
			|||
#option interface_mtu | 
				
			|||
 | 
				
			|||
# A ServerID is required by RFC2131. | 
				
			|||
require dhcp_server_identifier | 
				
			|||
 | 
				
			|||
# Generate Stable Private IPv6 Addresses instead of hardware based ones | 
				
			|||
slaac private | 
				
			|||
 | 
				
			|||
# A hook script is provided to lookup the hostname if not set by the DHCP | 
				
			|||
# server, but it should not be run by default. | 
				
			|||
nohook lookup-hostname | 
				
			|||
 | 
				
			|||
# We run wpa_supplicant from rc.inet1 and/or NM handles it on its own | 
				
			|||
nohook wpa_supplicant | 
				
			|||
 | 
				
			|||
@ -0,0 +1,666 @@ | 
				
			|||
# Configuration file for dnsmasq. | 
				
			|||
# | 
				
			|||
# Format is one option per line, legal options are the same | 
				
			|||
# as the long options legal on the command line. See | 
				
			|||
# "/usr/sbin/dnsmasq --help" or "man 8 dnsmasq" for details. | 
				
			|||
 | 
				
			|||
# Listen on this specific port instead of the standard DNS port | 
				
			|||
# (53). Setting this to zero completely disables DNS function, | 
				
			|||
# leaving only DHCP and/or TFTP. | 
				
			|||
#port=5353 | 
				
			|||
 | 
				
			|||
# The following two options make you a better netizen, since they | 
				
			|||
# tell dnsmasq to filter out queries which the public DNS cannot | 
				
			|||
# answer, and which load the servers (especially the root servers) | 
				
			|||
# unnecessarily. If you have a dial-on-demand link they also stop | 
				
			|||
# these requests from bringing up the link unnecessarily. | 
				
			|||
 | 
				
			|||
# Never forward plain names (without a dot or domain part) | 
				
			|||
#domain-needed | 
				
			|||
# Never forward addresses in the non-routed address spaces. | 
				
			|||
#bogus-priv | 
				
			|||
 | 
				
			|||
# Uncomment these to enable DNSSEC validation and caching: | 
				
			|||
# (Requires dnsmasq to be built with DNSSEC option.) | 
				
			|||
#conf-file=%%PREFIX%%/share/dnsmasq/trust-anchors.conf | 
				
			|||
#dnssec | 
				
			|||
 | 
				
			|||
# Replies which are not DNSSEC signed may be legitimate, because the domain | 
				
			|||
# is unsigned, or may be forgeries. Setting this option tells dnsmasq to | 
				
			|||
# check that an unsigned reply is OK, by finding a secure proof that a DS  | 
				
			|||
# record somewhere between the root and the domain does not exist.  | 
				
			|||
# The cost of setting this is that even queries in unsigned domains will need | 
				
			|||
# one or more extra DNS queries to verify. | 
				
			|||
#dnssec-check-unsigned | 
				
			|||
 | 
				
			|||
# Uncomment this to filter useless windows-originated DNS requests | 
				
			|||
# which can trigger dial-on-demand links needlessly. | 
				
			|||
# Note that (amongst other things) this blocks all SRV requests, | 
				
			|||
# so don't use it if you use eg Kerberos, SIP, XMMP or Google-talk. | 
				
			|||
# This option only affects forwarding, SRV records originating for | 
				
			|||
# dnsmasq (via srv-host= lines) are not suppressed by it. | 
				
			|||
#filterwin2k | 
				
			|||
 | 
				
			|||
# Change this line if you want dns to get its upstream servers from | 
				
			|||
# somewhere other that /etc/resolv.conf | 
				
			|||
#resolv-file= | 
				
			|||
 | 
				
			|||
# By  default,  dnsmasq  will  send queries to any of the upstream | 
				
			|||
# servers it knows about and tries to favour servers to are  known | 
				
			|||
# to  be  up.  Uncommenting this forces dnsmasq to try each query | 
				
			|||
# with  each  server  strictly  in  the  order  they   appear   in | 
				
			|||
# /etc/resolv.conf | 
				
			|||
#strict-order | 
				
			|||
 | 
				
			|||
# If you don't want dnsmasq to read /etc/resolv.conf or any other | 
				
			|||
# file, getting its servers from this file instead (see below), then | 
				
			|||
# uncomment this. | 
				
			|||
#no-resolv | 
				
			|||
 | 
				
			|||
# If you don't want dnsmasq to poll /etc/resolv.conf or other resolv | 
				
			|||
# files for changes and re-read them then uncomment this. | 
				
			|||
#no-poll | 
				
			|||
 | 
				
			|||
# Add other name servers here, with domain specs if they are for | 
				
			|||
# non-public domains. | 
				
			|||
#server=/localnet/192.168.0.1 | 
				
			|||
 | 
				
			|||
# Example of routing PTR queries to nameservers: this will send all | 
				
			|||
# address->name queries for 192.168.3/24 to nameserver 10.1.2.3 | 
				
			|||
#server=/3.168.192.in-addr.arpa/10.1.2.3 | 
				
			|||
 | 
				
			|||
# Add local-only domains here, queries in these domains are answered | 
				
			|||
# from /etc/hosts or DHCP only. | 
				
			|||
#local=/localnet/ | 
				
			|||
 | 
				
			|||
# Add domains which you want to force to an IP address here. | 
				
			|||
# The example below send any host in double-click.net to a local | 
				
			|||
# web-server. | 
				
			|||
#address=/double-click.net/127.0.0.1 | 
				
			|||
 | 
				
			|||
# --address (and --server) work with IPv6 addresses too. | 
				
			|||
#address=/www.thekelleys.org.uk/fe80::20d:60ff:fe36:f83 | 
				
			|||
 | 
				
			|||
# Add the IPs of all queries to yahoo.com, google.com, and their | 
				
			|||
# subdomains to the vpn and search ipsets: | 
				
			|||
#ipset=/yahoo.com/google.com/vpn,search | 
				
			|||
 | 
				
			|||
# You can control how dnsmasq talks to a server: this forces | 
				
			|||
# queries to 10.1.2.3 to be routed via eth1 | 
				
			|||
# server=10.1.2.3@eth1 | 
				
			|||
 | 
				
			|||
# and this sets the source (ie local) address used to talk to | 
				
			|||
# 10.1.2.3 to 192.168.1.1 port 55 (there must be a interface with that | 
				
			|||
# IP on the machine, obviously). | 
				
			|||
# server=10.1.2.3@192.168.1.1#55 | 
				
			|||
 | 
				
			|||
# If you want dnsmasq to change uid and gid to something other | 
				
			|||
# than the default, edit the following lines. | 
				
			|||
#user= | 
				
			|||
#group= | 
				
			|||
 | 
				
			|||
# If you want dnsmasq to listen for DHCP and DNS requests only on | 
				
			|||
# specified interfaces (and the loopback) give the name of the | 
				
			|||
# interface (eg eth0) here. | 
				
			|||
# Repeat the line for more than one interface. | 
				
			|||
#interface= | 
				
			|||
# Or you can specify which interface _not_ to listen on | 
				
			|||
#except-interface= | 
				
			|||
# Or which to listen on by address (remember to include 127.0.0.1 if | 
				
			|||
# you use this.) | 
				
			|||
listen-address=127.0.0.1 | 
				
			|||
# If you want dnsmasq to provide only DNS service on an interface, | 
				
			|||
# configure it as shown above, and then use the following line to | 
				
			|||
# disable DHCP and TFTP on it. | 
				
			|||
#no-dhcp-interface= | 
				
			|||
 | 
				
			|||
# On systems which support it, dnsmasq binds the wildcard address, | 
				
			|||
# even when it is listening on only some interfaces. It then discards | 
				
			|||
# requests that it shouldn't reply to. This has the advantage of | 
				
			|||
# working even when interfaces come and go and change address. If you | 
				
			|||
# want dnsmasq to really bind only the interfaces it is listening on, | 
				
			|||
# uncomment this option. About the only time you may need this is when | 
				
			|||
# running another nameserver on the same machine. | 
				
			|||
#bind-interfaces | 
				
			|||
 | 
				
			|||
# If you don't want dnsmasq to read /etc/hosts, uncomment the | 
				
			|||
# following line. | 
				
			|||
#no-hosts | 
				
			|||
# or if you want it to read another file, as well as /etc/hosts, use | 
				
			|||
# this. | 
				
			|||
#addn-hosts=/etc/banner_add_hosts | 
				
			|||
 | 
				
			|||
# Set this (and domain: see below) if you want to have a domain | 
				
			|||
# automatically added to simple names in a hosts-file. | 
				
			|||
#expand-hosts | 
				
			|||
 | 
				
			|||
# Set the domain for dnsmasq. this is optional, but if it is set, it | 
				
			|||
# does the following things. | 
				
			|||
# 1) Allows DHCP hosts to have fully qualified domain names, as long | 
				
			|||
#     as the domain part matches this setting. | 
				
			|||
# 2) Sets the "domain" DHCP option thereby potentially setting the | 
				
			|||
#    domain of all systems configured by DHCP | 
				
			|||
# 3) Provides the domain part for "expand-hosts" | 
				
			|||
#domain=thekelleys.org.uk | 
				
			|||
 | 
				
			|||
# Set a different domain for a particular subnet | 
				
			|||
#domain=wireless.thekelleys.org.uk,192.168.2.0/24 | 
				
			|||
 | 
				
			|||
# Same idea, but range rather then subnet | 
				
			|||
#domain=reserved.thekelleys.org.uk,192.68.3.100,192.168.3.200 | 
				
			|||
 | 
				
			|||
# Uncomment this to enable the integrated DHCP server, you need | 
				
			|||
# to supply the range of addresses available for lease and optionally | 
				
			|||
# a lease time. If you have more than one network, you will need to | 
				
			|||
# repeat this for each network on which you want to supply DHCP | 
				
			|||
# service. | 
				
			|||
#dhcp-range=192.168.0.50,192.168.0.150,12h | 
				
			|||
 | 
				
			|||
# This is an example of a DHCP range where the netmask is given. This | 
				
			|||
# is needed for networks we reach the dnsmasq DHCP server via a relay | 
				
			|||
# agent. If you don't know what a DHCP relay agent is, you probably | 
				
			|||
# don't need to worry about this. | 
				
			|||
#dhcp-range=192.168.0.50,192.168.0.150,255.255.255.0,12h | 
				
			|||
 | 
				
			|||
# This is an example of a DHCP range which sets a tag, so that | 
				
			|||
# some DHCP options may be set only for this network. | 
				
			|||
#dhcp-range=set:red,192.168.0.50,192.168.0.150 | 
				
			|||
 | 
				
			|||
# Use this DHCP range only when the tag "green" is set. | 
				
			|||
#dhcp-range=tag:green,192.168.0.50,192.168.0.150,12h | 
				
			|||
 | 
				
			|||
# Specify a subnet which can't be used for dynamic address allocation, | 
				
			|||
# is available for hosts with matching --dhcp-host lines. Note that | 
				
			|||
# dhcp-host declarations will be ignored unless there is a dhcp-range | 
				
			|||
# of some type for the subnet in question. | 
				
			|||
# In this case the netmask is implied (it comes from the network | 
				
			|||
# configuration on the machine running dnsmasq) it is possible to give | 
				
			|||
# an explicit netmask instead. | 
				
			|||
#dhcp-range=192.168.0.0,static | 
				
			|||
 | 
				
			|||
# Enable DHCPv6. Note that the prefix-length does not need to be specified | 
				
			|||
# and defaults to 64 if missing/ | 
				
			|||
#dhcp-range=1234::2, 1234::500, 64, 12h | 
				
			|||
 | 
				
			|||
# Do Router Advertisements, BUT NOT DHCP for this subnet. | 
				
			|||
#dhcp-range=1234::, ra-only  | 
				
			|||
 | 
				
			|||
# Do Router Advertisements, BUT NOT DHCP for this subnet, also try and | 
				
			|||
# add names to the DNS for the IPv6 address of SLAAC-configured dual-stack  | 
				
			|||
# hosts. Use the DHCPv4 lease to derive the name, network segment and  | 
				
			|||
# MAC address and assume that the host will also have an | 
				
			|||
# IPv6 address calculated using the SLAAC alogrithm. | 
				
			|||
#dhcp-range=1234::, ra-names | 
				
			|||
 | 
				
			|||
# Do Router Advertisements, BUT NOT DHCP for this subnet. | 
				
			|||
# Set the lifetime to 46 hours. (Note: minimum lifetime is 2 hours.) | 
				
			|||
#dhcp-range=1234::, ra-only, 48h | 
				
			|||
 | 
				
			|||
# Do DHCP and Router Advertisements for this subnet. Set the A bit in the RA | 
				
			|||
# so that clients can use SLAAC addresses as well as DHCP ones. | 
				
			|||
#dhcp-range=1234::2, 1234::500, slaac | 
				
			|||
 | 
				
			|||
# Do Router Advertisements and stateless DHCP for this subnet. Clients will | 
				
			|||
# not get addresses from DHCP, but they will get other configuration information. | 
				
			|||
# They will use SLAAC for addresses. | 
				
			|||
#dhcp-range=1234::, ra-stateless | 
				
			|||
 | 
				
			|||
# Do stateless DHCP, SLAAC, and generate DNS names for SLAAC addresses | 
				
			|||
# from DHCPv4 leases. | 
				
			|||
#dhcp-range=1234::, ra-stateless, ra-names | 
				
			|||
 | 
				
			|||
# Do router advertisements for all subnets where we're doing DHCPv6 | 
				
			|||
# Unless overriden by ra-stateless, ra-names, et al, the router  | 
				
			|||
# advertisements will have the M and O bits set, so that the clients | 
				
			|||
# get addresses and configuration from DHCPv6, and the A bit reset, so the  | 
				
			|||
# clients don't use SLAAC addresses. | 
				
			|||
#enable-ra | 
				
			|||
 | 
				
			|||
# Supply parameters for specified hosts using DHCP. There are lots | 
				
			|||
# of valid alternatives, so we will give examples of each. Note that | 
				
			|||
# IP addresses DO NOT have to be in the range given above, they just | 
				
			|||
# need to be on the same network. The order of the parameters in these | 
				
			|||
# do not matter, it's permissible to give name, address and MAC in any | 
				
			|||
# order. | 
				
			|||
 | 
				
			|||
# Always allocate the host with Ethernet address 11:22:33:44:55:66 | 
				
			|||
# The IP address 192.168.0.60 | 
				
			|||
#dhcp-host=11:22:33:44:55:66,192.168.0.60 | 
				
			|||
 | 
				
			|||
# Always set the name of the host with hardware address | 
				
			|||
# 11:22:33:44:55:66 to be "fred" | 
				
			|||
#dhcp-host=11:22:33:44:55:66,fred | 
				
			|||
 | 
				
			|||
# Always give the host with Ethernet address 11:22:33:44:55:66 | 
				
			|||
# the name fred and IP address 192.168.0.60 and lease time 45 minutes | 
				
			|||
#dhcp-host=11:22:33:44:55:66,fred,192.168.0.60,45m | 
				
			|||
 | 
				
			|||
# Give a host with Ethernet address 11:22:33:44:55:66 or | 
				
			|||
# 12:34:56:78:90:12 the IP address 192.168.0.60. Dnsmasq will assume | 
				
			|||
# that these two Ethernet interfaces will never be in use at the same | 
				
			|||
# time, and give the IP address to the second, even if it is already | 
				
			|||
# in use by the first. Useful for laptops with wired and wireless | 
				
			|||
# addresses. | 
				
			|||
#dhcp-host=11:22:33:44:55:66,12:34:56:78:90:12,192.168.0.60 | 
				
			|||
 | 
				
			|||
# Give the machine which says its name is "bert" IP address | 
				
			|||
# 192.168.0.70 and an infinite lease | 
				
			|||
#dhcp-host=bert,192.168.0.70,infinite | 
				
			|||
 | 
				
			|||
# Always give the host with client identifier 01:02:02:04 | 
				
			|||
# the IP address 192.168.0.60 | 
				
			|||
#dhcp-host=id:01:02:02:04,192.168.0.60 | 
				
			|||
 | 
				
			|||
# Always give the Infiniband interface with hardware address | 
				
			|||
# 80:00:00:48:fe:80:00:00:00:00:00:00:f4:52:14:03:00:28:05:81 the | 
				
			|||
# ip address 192.168.0.61. The client id is derived from the prefix | 
				
			|||
# ff:00:00:00:00:00:02:00:00:02:c9:00 and the last 8 pairs of | 
				
			|||
# hex digits of the hardware address. | 
				
			|||
#dhcp-host=id:ff:00:00:00:00:00:02:00:00:02:c9:00:f4:52:14:03:00:28:05:81,192.168.0.61 | 
				
			|||
 | 
				
			|||
# Always give the host with client identifier "marjorie" | 
				
			|||
# the IP address 192.168.0.60 | 
				
			|||
#dhcp-host=id:marjorie,192.168.0.60 | 
				
			|||
 | 
				
			|||
# Enable the address given for "judge" in /etc/hosts | 
				
			|||
# to be given to a machine presenting the name "judge" when | 
				
			|||
# it asks for a DHCP lease. | 
				
			|||
#dhcp-host=judge | 
				
			|||
 | 
				
			|||
# Never offer DHCP service to a machine whose Ethernet | 
				
			|||
# address is 11:22:33:44:55:66 | 
				
			|||
#dhcp-host=11:22:33:44:55:66,ignore | 
				
			|||
 | 
				
			|||
# Ignore any client-id presented by the machine with Ethernet | 
				
			|||
# address 11:22:33:44:55:66. This is useful to prevent a machine | 
				
			|||
# being treated differently when running under different OS's or | 
				
			|||
# between PXE boot and OS boot. | 
				
			|||
#dhcp-host=11:22:33:44:55:66,id:* | 
				
			|||
 | 
				
			|||
# Send extra options which are tagged as "red" to | 
				
			|||
# the machine with Ethernet address 11:22:33:44:55:66 | 
				
			|||
#dhcp-host=11:22:33:44:55:66,set:red | 
				
			|||
 | 
				
			|||
# Send extra options which are tagged as "red" to | 
				
			|||
# any machine with Ethernet address starting 11:22:33: | 
				
			|||
#dhcp-host=11:22:33:*:*:*,set:red | 
				
			|||
 | 
				
			|||
# Give a fixed IPv6 address and name to client with  | 
				
			|||
# DUID 00:01:00:01:16:d2:83:fc:92:d4:19:e2:d8:b2 | 
				
			|||
# Note the MAC addresses CANNOT be used to identify DHCPv6 clients. | 
				
			|||
# Note also the they [] around the IPv6 address are obilgatory. | 
				
			|||
#dhcp-host=id:00:01:00:01:16:d2:83:fc:92:d4:19:e2:d8:b2, fred, [1234::5]  | 
				
			|||
 | 
				
			|||
# Ignore any clients which are not specified in dhcp-host lines | 
				
			|||
# or /etc/ethers. Equivalent to ISC "deny unknown-clients". | 
				
			|||
# This relies on the special "known" tag which is set when | 
				
			|||
# a host is matched. | 
				
			|||
#dhcp-ignore=tag:!known | 
				
			|||
 | 
				
			|||
# Send extra options which are tagged as "red" to any machine whose | 
				
			|||
# DHCP vendorclass string includes the substring "Linux" | 
				
			|||
#dhcp-vendorclass=set:red,Linux | 
				
			|||
 | 
				
			|||
# Send extra options which are tagged as "red" to any machine one | 
				
			|||
# of whose DHCP userclass strings includes the substring "accounts" | 
				
			|||
#dhcp-userclass=set:red,accounts | 
				
			|||
 | 
				
			|||
# Send extra options which are tagged as "red" to any machine whose | 
				
			|||
# MAC address matches the pattern. | 
				
			|||
#dhcp-mac=set:red,00:60:8C:*:*:* | 
				
			|||
 | 
				
			|||
# If this line is uncommented, dnsmasq will read /etc/ethers and act | 
				
			|||
# on the ethernet-address/IP pairs found there just as if they had | 
				
			|||
# been given as --dhcp-host options. Useful if you keep | 
				
			|||
# MAC-address/host mappings there for other purposes. | 
				
			|||
#read-ethers | 
				
			|||
 | 
				
			|||
# Send options to hosts which ask for a DHCP lease. | 
				
			|||
# See RFC 2132 for details of available options. | 
				
			|||
# Common options can be given to dnsmasq by name: | 
				
			|||
# run "dnsmasq --help dhcp" to get a list. | 
				
			|||
# Note that all the common settings, such as netmask and | 
				
			|||
# broadcast address, DNS server and default route, are given | 
				
			|||
# sane defaults by dnsmasq. You very likely will not need | 
				
			|||
# any dhcp-options. If you use Windows clients and Samba, there | 
				
			|||
# are some options which are recommended, they are detailed at the | 
				
			|||
# end of this section. | 
				
			|||
 | 
				
			|||
# Override the default route supplied by dnsmasq, which assumes the | 
				
			|||
# router is the same machine as the one running dnsmasq. | 
				
			|||
#dhcp-option=3,1.2.3.4 | 
				
			|||
 | 
				
			|||
# Do the same thing, but using the option name | 
				
			|||
#dhcp-option=option:router,1.2.3.4 | 
				
			|||
 | 
				
			|||
# Override the default route supplied by dnsmasq and send no default | 
				
			|||
# route at all. Note that this only works for the options sent by | 
				
			|||
# default (1, 3, 6, 12, 28) the same line will send a zero-length option | 
				
			|||
# for all other option numbers. | 
				
			|||
#dhcp-option=3 | 
				
			|||
 | 
				
			|||
# Set the NTP time server addresses to 192.168.0.4 and 10.10.0.5 | 
				
			|||
#dhcp-option=option:ntp-server,192.168.0.4,10.10.0.5 | 
				
			|||
 | 
				
			|||
# Send DHCPv6 option. Note [] around IPv6 addresses. | 
				
			|||
#dhcp-option=option6:dns-server,[1234::77],[1234::88] | 
				
			|||
 | 
				
			|||
# Send DHCPv6 option for namservers as the machine running  | 
				
			|||
# dnsmasq and another. | 
				
			|||
#dhcp-option=option6:dns-server,[::],[1234::88] | 
				
			|||
 | 
				
			|||
# Ask client to poll for option changes every six hours. (RFC4242) | 
				
			|||
#dhcp-option=option6:information-refresh-time,6h | 
				
			|||
 | 
				
			|||
# Set option 58 client renewal time (T1). Defaults to half of the | 
				
			|||
# lease time if not specified. (RFC2132) | 
				
			|||
#dhcp-option=option:T1:1m | 
				
			|||
 | 
				
			|||
# Set option 59 rebinding time (T2). Defaults to 7/8 of the | 
				
			|||
# lease time if not specified. (RFC2132) | 
				
			|||
#dhcp-option=option:T2:2m | 
				
			|||
 | 
				
			|||
# Set the NTP time server address to be the same machine as | 
				
			|||
# is running dnsmasq | 
				
			|||
#dhcp-option=42,0.0.0.0 | 
				
			|||
 | 
				
			|||
# Set the NIS domain name to "welly" | 
				
			|||
#dhcp-option=40,welly | 
				
			|||
 | 
				
			|||
# Set the default time-to-live to 50 | 
				
			|||
#dhcp-option=23,50 | 
				
			|||
 | 
				
			|||
# Set the "all subnets are local" flag | 
				
			|||
#dhcp-option=27,1 | 
				
			|||
 | 
				
			|||
# Send the etherboot magic flag and then etherboot options (a string). | 
				
			|||
#dhcp-option=128,e4:45:74:68:00:00 | 
				
			|||
#dhcp-option=129,NIC=eepro100 | 
				
			|||
 | 
				
			|||
# Specify an option which will only be sent to the "red" network | 
				
			|||
# (see dhcp-range for the declaration of the "red" network) | 
				
			|||
# Note that the tag: part must precede the option: part. | 
				
			|||
#dhcp-option = tag:red, option:ntp-server, 192.168.1.1 | 
				
			|||
 | 
				
			|||
# The following DHCP options set up dnsmasq in the same way as is specified | 
				
			|||
# for the ISC dhcpcd in | 
				
			|||
# http://www.samba.org/samba/ftp/docs/textdocs/DHCP-Server-Configuration.txt | 
				
			|||
# adapted for a typical dnsmasq installation where the host running | 
				
			|||
# dnsmasq is also the host running samba. | 
				
			|||
# you may want to uncomment some or all of them if you use | 
				
			|||
# Windows clients and Samba. | 
				
			|||
#dhcp-option=19,0           # option ip-forwarding off | 
				
			|||
#dhcp-option=44,0.0.0.0     # set netbios-over-TCP/IP nameserver(s) aka WINS server(s) | 
				
			|||
#dhcp-option=45,0.0.0.0     # netbios datagram distribution server | 
				
			|||
#dhcp-option=46,8           # netbios node type | 
				
			|||
 | 
				
			|||
# Send an empty WPAD option. This may be REQUIRED to get windows 7 to behave. | 
				
			|||
#dhcp-option=252,"\n" | 
				
			|||
 | 
				
			|||
# Send RFC-3397 DNS domain search DHCP option. WARNING: Your DHCP client | 
				
			|||
# probably doesn't support this...... | 
				
			|||
#dhcp-option=option:domain-search,eng.apple.com,marketing.apple.com | 
				
			|||
 | 
				
			|||
# Send RFC-3442 classless static routes (note the netmask encoding) | 
				
			|||
#dhcp-option=121,192.168.1.0/24,1.2.3.4,10.0.0.0/8,5.6.7.8 | 
				
			|||
 | 
				
			|||
# Send vendor-class specific options encapsulated in DHCP option 43. | 
				
			|||
# The meaning of the options is defined by the vendor-class so | 
				
			|||
# options are sent only when the client supplied vendor class | 
				
			|||
# matches the class given here. (A substring match is OK, so "MSFT" | 
				
			|||
# matches "MSFT" and "MSFT 5.0"). This example sets the | 
				
			|||
# mtftp address to 0.0.0.0 for PXEClients. | 
				
			|||
#dhcp-option=vendor:PXEClient,1,0.0.0.0 | 
				
			|||
 | 
				
			|||
# Send microsoft-specific option to tell windows to release the DHCP lease | 
				
			|||
# when it shuts down. Note the "i" flag, to tell dnsmasq to send the | 
				
			|||
# value as a four-byte integer - that's what microsoft wants. See | 
				
			|||
# http://technet2.microsoft.com/WindowsServer/en/library/a70f1bb7-d2d4-49f0-96d6-4b7414ecfaae1033.mspx?mfr=true | 
				
			|||
#dhcp-option=vendor:MSFT,2,1i | 
				
			|||
 | 
				
			|||
# Send the Encapsulated-vendor-class ID needed by some configurations of | 
				
			|||
# Etherboot to allow is to recognise the DHCP server. | 
				
			|||
#dhcp-option=vendor:Etherboot,60,"Etherboot" | 
				
			|||
 | 
				
			|||
# Send options to PXELinux. Note that we need to send the options even | 
				
			|||
# though they don't appear in the parameter request list, so we need | 
				
			|||
# to use dhcp-option-force here. | 
				
			|||
# See http://syslinux.zytor.com/pxe.php#special for details. | 
				
			|||
# Magic number - needed before anything else is recognised | 
				
			|||
#dhcp-option-force=208,f1:00:74:7e | 
				
			|||
# Configuration file name | 
				
			|||
#dhcp-option-force=209,configs/common | 
				
			|||
# Path prefix | 
				
			|||
#dhcp-option-force=210,/tftpboot/pxelinux/files/ | 
				
			|||
# Reboot time. (Note 'i' to send 32-bit value) | 
				
			|||
#dhcp-option-force=211,30i | 
				
			|||
 | 
				
			|||
# Set the boot filename for netboot/PXE. You will only need | 
				
			|||
# this is you want to boot machines over the network and you will need | 
				
			|||
# a TFTP server; either dnsmasq's built in TFTP server or an | 
				
			|||
# external one. (See below for how to enable the TFTP server.) | 
				
			|||
#dhcp-boot=pxelinux.0 | 
				
			|||
 | 
				
			|||
# The same as above, but use custom tftp-server instead machine running dnsmasq | 
				
			|||
#dhcp-boot=pxelinux,server.name,192.168.1.100 | 
				
			|||
 | 
				
			|||
# Boot for Etherboot gPXE. The idea is to send two different | 
				
			|||
# filenames, the first loads gPXE, and the second tells gPXE what to | 
				
			|||
# load. The dhcp-match sets the gpxe tag for requests from gPXE. | 
				
			|||
#dhcp-match=set:gpxe,175 # gPXE sends a 175 option. | 
				
			|||
#dhcp-boot=tag:!gpxe,undionly.kpxe | 
				
			|||
#dhcp-boot=mybootimage | 
				
			|||
 | 
				
			|||
# Encapsulated options for Etherboot gPXE. All the options are | 
				
			|||
# encapsulated within option 175 | 
				
			|||
#dhcp-option=encap:175, 1, 5b         # priority code | 
				
			|||
#dhcp-option=encap:175, 176, 1b       # no-proxydhcp | 
				
			|||
#dhcp-option=encap:175, 177, string   # bus-id | 
				
			|||
#dhcp-option=encap:175, 189, 1b       # BIOS drive code | 
				
			|||
#dhcp-option=encap:175, 190, user     # iSCSI username | 
				
			|||
#dhcp-option=encap:175, 191, pass     # iSCSI password | 
				
			|||
 | 
				
			|||
# Test for the architecture of a netboot client. PXE clients are | 
				
			|||
# supposed to send their architecture as option 93. (See RFC 4578) | 
				
			|||
#dhcp-match=peecees, option:client-arch, 0 #x86-32 | 
				
			|||
#dhcp-match=itanics, option:client-arch, 2 #IA64 | 
				
			|||
#dhcp-match=hammers, option:client-arch, 6 #x86-64 | 
				
			|||
#dhcp-match=mactels, option:client-arch, 7 #EFI x86-64 | 
				
			|||
 | 
				
			|||
# Do real PXE, rather than just booting a single file, this is an | 
				
			|||
# alternative to dhcp-boot. | 
				
			|||
#pxe-prompt="What system shall I netboot?" | 
				
			|||
# or with timeout before first available action is taken: | 
				
			|||
#pxe-prompt="Press F8 for menu.", 60 | 
				
			|||
 | 
				
			|||
# Available boot services. for PXE. | 
				
			|||
#pxe-service=x86PC, "Boot from local disk" | 
				
			|||
 | 
				
			|||
# Loads <tftp-root>/pxelinux.0 from dnsmasq TFTP server. | 
				
			|||
#pxe-service=x86PC, "Install Linux", pxelinux | 
				
			|||
 | 
				
			|||
# Loads <tftp-root>/pxelinux.0 from TFTP server at 1.2.3.4. | 
				
			|||
# Beware this fails on old PXE ROMS. | 
				
			|||
#pxe-service=x86PC, "Install Linux", pxelinux, 1.2.3.4 | 
				
			|||
 | 
				
			|||
# Use bootserver on network, found my multicast or broadcast. | 
				
			|||
#pxe-service=x86PC, "Install windows from RIS server", 1 | 
				
			|||
 | 
				
			|||
# Use bootserver at a known IP address. | 
				
			|||
#pxe-service=x86PC, "Install windows from RIS server", 1, 1.2.3.4 | 
				
			|||
 | 
				
			|||
# If you have multicast-FTP available, | 
				
			|||
# information for that can be passed in a similar way using options 1 | 
				
			|||
# to 5. See page 19 of | 
				
			|||
# http://download.intel.com/design/archives/wfm/downloads/pxespec.pdf | 
				
			|||
 | 
				
			|||
 | 
				
			|||
# Enable dnsmasq's built-in TFTP server | 
				
			|||
#enable-tftp | 
				
			|||
 | 
				
			|||
# Set the root directory for files available via FTP. | 
				
			|||
#tftp-root=/var/ftpd | 
				
			|||
 | 
				
			|||
# Do not abort if the tftp-root is unavailable | 
				
			|||
#tftp-no-fail | 
				
			|||
 | 
				
			|||
# Make the TFTP server more secure: with this set, only files owned by | 
				
			|||
# the user dnsmasq is running as will be send over the net. | 
				
			|||
#tftp-secure | 
				
			|||
 | 
				
			|||
# This option stops dnsmasq from negotiating a larger blocksize for TFTP | 
				
			|||
# transfers. It will slow things down, but may rescue some broken TFTP | 
				
			|||
# clients. | 
				
			|||
#tftp-no-blocksize | 
				
			|||
 | 
				
			|||
# Set the boot file name only when the "red" tag is set. | 
				
			|||
#dhcp-boot=tag:red,pxelinux.red-net | 
				
			|||
 | 
				
			|||
# An example of dhcp-boot with an external TFTP server: the name and IP | 
				
			|||
# address of the server are given after the filename. | 
				
			|||
# Can fail with old PXE ROMS. Overridden by --pxe-service. | 
				
			|||
#dhcp-boot=/var/ftpd/pxelinux.0,boothost,192.168.0.3 | 
				
			|||
 | 
				
			|||
# If there are multiple external tftp servers having a same name | 
				
			|||
# (using /etc/hosts) then that name can be specified as the | 
				
			|||
# tftp_servername (the third option to dhcp-boot) and in that | 
				
			|||
# case dnsmasq resolves this name and returns the resultant IP | 
				
			|||
# addresses in round robin fasion. This facility can be used to | 
				
			|||
# load balance the tftp load among a set of servers. | 
				
			|||
#dhcp-boot=/var/ftpd/pxelinux.0,boothost,tftp_server_name | 
				
			|||
 | 
				
			|||
# Set the limit on DHCP leases, the default is 150 | 
				
			|||
#dhcp-lease-max=150 | 
				
			|||
 | 
				
			|||
# The DHCP server needs somewhere on disk to keep its lease database. | 
				
			|||
# This defaults to a sane location, but if you want to change it, use | 
				
			|||
# the line below. | 
				
			|||
#dhcp-leasefile=/var/state/dnsmasq/dnsmasq.leases | 
				
			|||
 | 
				
			|||
# Set the DHCP server to authoritative mode. In this mode it will barge in | 
				
			|||
# and take over the lease for any client which broadcasts on the network, | 
				
			|||
# whether it has a record of the lease or not. This avoids long timeouts | 
				
			|||
# when a machine wakes up on a new network. DO NOT enable this if there's | 
				
			|||
# the slightest chance that you might end up accidentally configuring a DHCP | 
				
			|||
# server for your campus/company accidentally. The ISC server uses | 
				
			|||
# the same option, and this URL provides more information: | 
				
			|||
# http://www.isc.org/files/auth.html | 
				
			|||
#dhcp-authoritative | 
				
			|||
 | 
				
			|||
# Run an executable when a DHCP lease is created or destroyed. | 
				
			|||
# The arguments sent to the script are "add" or "del", | 
				
			|||
# then the MAC address, the IP address and finally the hostname | 
				
			|||
# if there is one. | 
				
			|||
#dhcp-script=/bin/echo | 
				
			|||
 | 
				
			|||
# Set the cachesize here. | 
				
			|||
#cache-size=150 | 
				
			|||
 | 
				
			|||
# If you want to disable negative caching, uncomment this. | 
				
			|||
#no-negcache | 
				
			|||
 | 
				
			|||
# Normally responses which come from /etc/hosts and the DHCP lease | 
				
			|||
# file have Time-To-Live set as zero, which conventionally means | 
				
			|||
# do not cache further. If you are happy to trade lower load on the | 
				
			|||
# server for potentially stale date, you can set a time-to-live (in | 
				
			|||
# seconds) here. | 
				
			|||
#local-ttl= | 
				
			|||
 | 
				
			|||
# If you want dnsmasq to detect attempts by Verisign to send queries | 
				
			|||
# to unregistered .com and .net hosts to its sitefinder service and | 
				
			|||
# have dnsmasq instead return the correct NXDOMAIN response, uncomment | 
				
			|||
# this line. You can add similar lines to do the same for other | 
				
			|||
# registries which have implemented wildcard A records. | 
				
			|||
#bogus-nxdomain=64.94.110.11 | 
				
			|||
 | 
				
			|||
# If you want to fix up DNS results from upstream servers, use the | 
				
			|||
# alias option. This only works for IPv4. | 
				
			|||
# This alias makes a result of 1.2.3.4 appear as 5.6.7.8 | 
				
			|||
#alias=1.2.3.4,5.6.7.8 | 
				
			|||
# and this maps 1.2.3.x to 5.6.7.x | 
				
			|||
#alias=1.2.3.0,5.6.7.0,255.255.255.0 | 
				
			|||
# and this maps 192.168.0.10->192.168.0.40 to 10.0.0.10->10.0.0.40 | 
				
			|||
#alias=192.168.0.10-192.168.0.40,10.0.0.0,255.255.255.0 | 
				
			|||
 | 
				
			|||
# Change these lines if you want dnsmasq to serve MX records. | 
				
			|||
 | 
				
			|||
# Return an MX record named "maildomain.com" with target | 
				
			|||
# servermachine.com and preference 50 | 
				
			|||
#mx-host=maildomain.com,servermachine.com,50 | 
				
			|||
 | 
				
			|||
# Set the default target for MX records created using the localmx option. | 
				
			|||
#mx-target=servermachine.com | 
				
			|||
 | 
				
			|||
# Return an MX record pointing to the mx-target for all local | 
				
			|||
# machines. | 
				
			|||
#localmx | 
				
			|||
 | 
				
			|||
# Return an MX record pointing to itself for all local machines. | 
				
			|||
#selfmx | 
				
			|||
 | 
				
			|||
# Change the following lines if you want dnsmasq to serve SRV | 
				
			|||
# records.  These are useful if you want to serve ldap requests for | 
				
			|||
# Active Directory and other windows-originated DNS requests. | 
				
			|||
# See RFC 2782. | 
				
			|||
# You may add multiple srv-host lines. | 
				
			|||
# The fields are <name>,<target>,<port>,<priority>,<weight> | 
				
			|||
# If the domain part if missing from the name (so that is just has the | 
				
			|||
# service and protocol sections) then the domain given by the domain= | 
				
			|||
# config option is used. (Note that expand-hosts does not need to be | 
				
			|||
# set for this to work.) | 
				
			|||
 | 
				
			|||
# A SRV record sending LDAP for the example.com domain to | 
				
			|||
# ldapserver.example.com port 389 | 
				
			|||
#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389 | 
				
			|||
 | 
				
			|||
# A SRV record sending LDAP for the example.com domain to | 
				
			|||
# ldapserver.example.com port 389 (using domain=) | 
				
			|||
#domain=example.com | 
				
			|||
#srv-host=_ldap._tcp,ldapserver.example.com,389 | 
				
			|||
 | 
				
			|||
# Two SRV records for LDAP, each with different priorities | 
				
			|||
#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,1 | 
				
			|||
#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,2 | 
				
			|||
 | 
				
			|||
# A SRV record indicating that there is no LDAP server for the domain | 
				
			|||
# example.com | 
				
			|||
#srv-host=_ldap._tcp.example.com | 
				
			|||
 | 
				
			|||
# The following line shows how to make dnsmasq serve an arbitrary PTR | 
				
			|||
# record. This is useful for DNS-SD. (Note that the | 
				
			|||
# domain-name expansion done for SRV records _does_not | 
				
			|||
# occur for PTR records.) | 
				
			|||
#ptr-record=_http._tcp.dns-sd-services,"New Employee Page._http._tcp.dns-sd-services" | 
				
			|||
 | 
				
			|||
# Change the following lines to enable dnsmasq to serve TXT records. | 
				
			|||
# These are used for things like SPF and zeroconf. (Note that the | 
				
			|||
# domain-name expansion done for SRV records _does_not | 
				
			|||
# occur for TXT records.) | 
				
			|||
 | 
				
			|||
#Example SPF. | 
				
			|||
#txt-record=example.com,"v=spf1 a -all" | 
				
			|||
 | 
				
			|||
#Example zeroconf | 
				
			|||
#txt-record=_http._tcp.example.com,name=value,paper=A4 | 
				
			|||
 | 
				
			|||
# Provide an alias for a "local" DNS name. Note that this _only_ works | 
				
			|||
# for targets which are names from DHCP or /etc/hosts. Give host | 
				
			|||
# "bert" another name, bertrand | 
				
			|||
#cname=bertand,bert | 
				
			|||
 | 
				
			|||
# For debugging purposes, log each DNS query as it passes through | 
				
			|||
# dnsmasq. | 
				
			|||
#log-queries | 
				
			|||
 | 
				
			|||
# Log lots of extra information about DHCP transactions. | 
				
			|||
#log-dhcp | 
				
			|||
 | 
				
			|||
# Include another lot of configuration options. | 
				
			|||
#conf-file=/etc/dnsmasq.more.conf | 
				
			|||
#conf-dir=/etc/dnsmasq.d | 
				
			|||
 | 
				
			|||
# Include all the files in a directory except those ending in .bak | 
				
			|||
#conf-dir=/etc/dnsmasq.d,.bak | 
				
			|||
 | 
				
			|||
# Include all files in a directory which end in .conf | 
				
			|||
#conf-dir=/etc/dnsmasq.d/,*.conf | 
				
			|||
@ -0,0 +1,666 @@ | 
				
			|||
# Configuration file for dnsmasq. | 
				
			|||
# | 
				
			|||
# Format is one option per line, legal options are the same | 
				
			|||
# as the long options legal on the command line. See | 
				
			|||
# "/usr/sbin/dnsmasq --help" or "man 8 dnsmasq" for details. | 
				
			|||
 | 
				
			|||
# Listen on this specific port instead of the standard DNS port | 
				
			|||
# (53). Setting this to zero completely disables DNS function, | 
				
			|||
# leaving only DHCP and/or TFTP. | 
				
			|||
#port=5353 | 
				
			|||
 | 
				
			|||
# The following two options make you a better netizen, since they | 
				
			|||
# tell dnsmasq to filter out queries which the public DNS cannot | 
				
			|||
# answer, and which load the servers (especially the root servers) | 
				
			|||
# unnecessarily. If you have a dial-on-demand link they also stop | 
				
			|||
# these requests from bringing up the link unnecessarily. | 
				
			|||
 | 
				
			|||
# Never forward plain names (without a dot or domain part) | 
				
			|||
#domain-needed | 
				
			|||
# Never forward addresses in the non-routed address spaces. | 
				
			|||
#bogus-priv | 
				
			|||
 | 
				
			|||
# Uncomment these to enable DNSSEC validation and caching: | 
				
			|||
# (Requires dnsmasq to be built with DNSSEC option.) | 
				
			|||
#conf-file=%%PREFIX%%/share/dnsmasq/trust-anchors.conf | 
				
			|||
#dnssec | 
				
			|||
 | 
				
			|||
# Replies which are not DNSSEC signed may be legitimate, because the domain | 
				
			|||
# is unsigned, or may be forgeries. Setting this option tells dnsmasq to | 
				
			|||
# check that an unsigned reply is OK, by finding a secure proof that a DS  | 
				
			|||
# record somewhere between the root and the domain does not exist.  | 
				
			|||
# The cost of setting this is that even queries in unsigned domains will need | 
				
			|||
# one or more extra DNS queries to verify. | 
				
			|||
#dnssec-check-unsigned | 
				
			|||
 | 
				
			|||
# Uncomment this to filter useless windows-originated DNS requests | 
				
			|||
# which can trigger dial-on-demand links needlessly. | 
				
			|||
# Note that (amongst other things) this blocks all SRV requests, | 
				
			|||
# so don't use it if you use eg Kerberos, SIP, XMMP or Google-talk. | 
				
			|||
# This option only affects forwarding, SRV records originating for | 
				
			|||
# dnsmasq (via srv-host= lines) are not suppressed by it. | 
				
			|||
#filterwin2k | 
				
			|||
 | 
				
			|||
# Change this line if you want dns to get its upstream servers from | 
				
			|||
# somewhere other that /etc/resolv.conf | 
				
			|||
#resolv-file= | 
				
			|||
 | 
				
			|||
# By  default,  dnsmasq  will  send queries to any of the upstream | 
				
			|||
# servers it knows about and tries to favour servers to are  known | 
				
			|||
# to  be  up.  Uncommenting this forces dnsmasq to try each query | 
				
			|||
# with  each  server  strictly  in  the  order  they   appear   in | 
				
			|||
# /etc/resolv.conf | 
				
			|||
#strict-order | 
				
			|||
 | 
				
			|||
# If you don't want dnsmasq to read /etc/resolv.conf or any other | 
				
			|||
# file, getting its servers from this file instead (see below), then | 
				
			|||
# uncomment this. | 
				
			|||
#no-resolv | 
				
			|||
 | 
				
			|||
# If you don't want dnsmasq to poll /etc/resolv.conf or other resolv | 
				
			|||
# files for changes and re-read them then uncomment this. | 
				
			|||
#no-poll | 
				
			|||
 | 
				
			|||
# Add other name servers here, with domain specs if they are for | 
				
			|||
# non-public domains. | 
				
			|||
#server=/localnet/192.168.0.1 | 
				
			|||
 | 
				
			|||
# Example of routing PTR queries to nameservers: this will send all | 
				
			|||
# address->name queries for 192.168.3/24 to nameserver 10.1.2.3 | 
				
			|||
#server=/3.168.192.in-addr.arpa/10.1.2.3 | 
				
			|||
 | 
				
			|||
# Add local-only domains here, queries in these domains are answered | 
				
			|||
# from /etc/hosts or DHCP only. | 
				
			|||
#local=/localnet/ | 
				
			|||
 | 
				
			|||
# Add domains which you want to force to an IP address here. | 
				
			|||
# The example below send any host in double-click.net to a local | 
				
			|||
# web-server. | 
				
			|||
#address=/double-click.net/127.0.0.1 | 
				
			|||
 | 
				
			|||
# --address (and --server) work with IPv6 addresses too. | 
				
			|||
#address=/www.thekelleys.org.uk/fe80::20d:60ff:fe36:f83 | 
				
			|||
 | 
				
			|||
# Add the IPs of all queries to yahoo.com, google.com, and their | 
				
			|||
# subdomains to the vpn and search ipsets: | 
				
			|||
#ipset=/yahoo.com/google.com/vpn,search | 
				
			|||
 | 
				
			|||
# You can control how dnsmasq talks to a server: this forces | 
				
			|||
# queries to 10.1.2.3 to be routed via eth1 | 
				
			|||
# server=10.1.2.3@eth1 | 
				
			|||
 | 
				
			|||
# and this sets the source (ie local) address used to talk to | 
				
			|||
# 10.1.2.3 to 192.168.1.1 port 55 (there must be a interface with that | 
				
			|||
# IP on the machine, obviously). | 
				
			|||
# server=10.1.2.3@192.168.1.1#55 | 
				
			|||
 | 
				
			|||
# If you want dnsmasq to change uid and gid to something other | 
				
			|||
# than the default, edit the following lines. | 
				
			|||
#user= | 
				
			|||
#group= | 
				
			|||
 | 
				
			|||
# If you want dnsmasq to listen for DHCP and DNS requests only on | 
				
			|||
# specified interfaces (and the loopback) give the name of the | 
				
			|||
# interface (eg eth0) here. | 
				
			|||
# Repeat the line for more than one interface. | 
				
			|||
#interface= | 
				
			|||
# Or you can specify which interface _not_ to listen on | 
				
			|||
#except-interface= | 
				
			|||
# Or which to listen on by address (remember to include 127.0.0.1 if | 
				
			|||
# you use this.) | 
				
			|||
#listen-address= | 
				
			|||
# If you want dnsmasq to provide only DNS service on an interface, | 
				
			|||
# configure it as shown above, and then use the following line to | 
				
			|||
# disable DHCP and TFTP on it. | 
				
			|||
#no-dhcp-interface= | 
				
			|||
 | 
				
			|||
# On systems which support it, dnsmasq binds the wildcard address, | 
				
			|||
# even when it is listening on only some interfaces. It then discards | 
				
			|||
# requests that it shouldn't reply to. This has the advantage of | 
				
			|||
# working even when interfaces come and go and change address. If you | 
				
			|||
# want dnsmasq to really bind only the interfaces it is listening on, | 
				
			|||
# uncomment this option. About the only time you may need this is when | 
				
			|||
# running another nameserver on the same machine. | 
				
			|||
#bind-interfaces | 
				
			|||
 | 
				
			|||
# If you don't want dnsmasq to read /etc/hosts, uncomment the | 
				
			|||
# following line. | 
				
			|||
#no-hosts | 
				
			|||
# or if you want it to read another file, as well as /etc/hosts, use | 
				
			|||
# this. | 
				
			|||
#addn-hosts=/etc/banner_add_hosts | 
				
			|||
 | 
				
			|||
# Set this (and domain: see below) if you want to have a domain | 
				
			|||
# automatically added to simple names in a hosts-file. | 
				
			|||
#expand-hosts | 
				
			|||
 | 
				
			|||
# Set the domain for dnsmasq. this is optional, but if it is set, it | 
				
			|||
# does the following things. | 
				
			|||
# 1) Allows DHCP hosts to have fully qualified domain names, as long | 
				
			|||
#     as the domain part matches this setting. | 
				
			|||
# 2) Sets the "domain" DHCP option thereby potentially setting the | 
				
			|||
#    domain of all systems configured by DHCP | 
				
			|||
# 3) Provides the domain part for "expand-hosts" | 
				
			|||
#domain=thekelleys.org.uk | 
				
			|||
 | 
				
			|||
# Set a different domain for a particular subnet | 
				
			|||
#domain=wireless.thekelleys.org.uk,192.168.2.0/24 | 
				
			|||
 | 
				
			|||
# Same idea, but range rather then subnet | 
				
			|||
#domain=reserved.thekelleys.org.uk,192.68.3.100,192.168.3.200 | 
				
			|||
 | 
				
			|||
# Uncomment this to enable the integrated DHCP server, you need | 
				
			|||
# to supply the range of addresses available for lease and optionally | 
				
			|||
# a lease time. If you have more than one network, you will need to | 
				
			|||
# repeat this for each network on which you want to supply DHCP | 
				
			|||
# service. | 
				
			|||
#dhcp-range=192.168.0.50,192.168.0.150,12h | 
				
			|||
 | 
				
			|||
# This is an example of a DHCP range where the netmask is given. This | 
				
			|||
# is needed for networks we reach the dnsmasq DHCP server via a relay | 
				
			|||
# agent. If you don't know what a DHCP relay agent is, you probably | 
				
			|||
# don't need to worry about this. | 
				
			|||
#dhcp-range=192.168.0.50,192.168.0.150,255.255.255.0,12h | 
				
			|||
 | 
				
			|||
# This is an example of a DHCP range which sets a tag, so that | 
				
			|||
# some DHCP options may be set only for this network. | 
				
			|||
#dhcp-range=set:red,192.168.0.50,192.168.0.150 | 
				
			|||
 | 
				
			|||
# Use this DHCP range only when the tag "green" is set. | 
				
			|||
#dhcp-range=tag:green,192.168.0.50,192.168.0.150,12h | 
				
			|||
 | 
				
			|||
# Specify a subnet which can't be used for dynamic address allocation, | 
				
			|||
# is available for hosts with matching --dhcp-host lines. Note that | 
				
			|||
# dhcp-host declarations will be ignored unless there is a dhcp-range | 
				
			|||
# of some type for the subnet in question. | 
				
			|||
# In this case the netmask is implied (it comes from the network | 
				
			|||
# configuration on the machine running dnsmasq) it is possible to give | 
				
			|||
# an explicit netmask instead. | 
				
			|||
#dhcp-range=192.168.0.0,static | 
				
			|||
 | 
				
			|||
# Enable DHCPv6. Note that the prefix-length does not need to be specified | 
				
			|||
# and defaults to 64 if missing/ | 
				
			|||
#dhcp-range=1234::2, 1234::500, 64, 12h | 
				
			|||
 | 
				
			|||
# Do Router Advertisements, BUT NOT DHCP for this subnet. | 
				
			|||
#dhcp-range=1234::, ra-only  | 
				
			|||
 | 
				
			|||
# Do Router Advertisements, BUT NOT DHCP for this subnet, also try and | 
				
			|||
# add names to the DNS for the IPv6 address of SLAAC-configured dual-stack  | 
				
			|||
# hosts. Use the DHCPv4 lease to derive the name, network segment and  | 
				
			|||
# MAC address and assume that the host will also have an | 
				
			|||
# IPv6 address calculated using the SLAAC alogrithm. | 
				
			|||
#dhcp-range=1234::, ra-names | 
				
			|||
 | 
				
			|||
# Do Router Advertisements, BUT NOT DHCP for this subnet. | 
				
			|||
# Set the lifetime to 46 hours. (Note: minimum lifetime is 2 hours.) | 
				
			|||
#dhcp-range=1234::, ra-only, 48h | 
				
			|||
 | 
				
			|||
# Do DHCP and Router Advertisements for this subnet. Set the A bit in the RA | 
				
			|||
# so that clients can use SLAAC addresses as well as DHCP ones. | 
				
			|||
#dhcp-range=1234::2, 1234::500, slaac | 
				
			|||
 | 
				
			|||
# Do Router Advertisements and stateless DHCP for this subnet. Clients will | 
				
			|||
# not get addresses from DHCP, but they will get other configuration information. | 
				
			|||
# They will use SLAAC for addresses. | 
				
			|||
#dhcp-range=1234::, ra-stateless | 
				
			|||
 | 
				
			|||
# Do stateless DHCP, SLAAC, and generate DNS names for SLAAC addresses | 
				
			|||
# from DHCPv4 leases. | 
				
			|||
#dhcp-range=1234::, ra-stateless, ra-names | 
				
			|||
 | 
				
			|||
# Do router advertisements for all subnets where we're doing DHCPv6 | 
				
			|||
# Unless overriden by ra-stateless, ra-names, et al, the router  | 
				
			|||
# advertisements will have the M and O bits set, so that the clients | 
				
			|||
# get addresses and configuration from DHCPv6, and the A bit reset, so the  | 
				
			|||
# clients don't use SLAAC addresses. | 
				
			|||
#enable-ra | 
				
			|||
 | 
				
			|||
# Supply parameters for specified hosts using DHCP. There are lots | 
				
			|||
# of valid alternatives, so we will give examples of each. Note that | 
				
			|||
# IP addresses DO NOT have to be in the range given above, they just | 
				
			|||
# need to be on the same network. The order of the parameters in these | 
				
			|||
# do not matter, it's permissible to give name, address and MAC in any | 
				
			|||
# order. | 
				
			|||
 | 
				
			|||
# Always allocate the host with Ethernet address 11:22:33:44:55:66 | 
				
			|||
# The IP address 192.168.0.60 | 
				
			|||
#dhcp-host=11:22:33:44:55:66,192.168.0.60 | 
				
			|||
 | 
				
			|||
# Always set the name of the host with hardware address | 
				
			|||
# 11:22:33:44:55:66 to be "fred" | 
				
			|||
#dhcp-host=11:22:33:44:55:66,fred | 
				
			|||
 | 
				
			|||
# Always give the host with Ethernet address 11:22:33:44:55:66 | 
				
			|||
# the name fred and IP address 192.168.0.60 and lease time 45 minutes | 
				
			|||
#dhcp-host=11:22:33:44:55:66,fred,192.168.0.60,45m | 
				
			|||
 | 
				
			|||
# Give a host with Ethernet address 11:22:33:44:55:66 or | 
				
			|||
# 12:34:56:78:90:12 the IP address 192.168.0.60. Dnsmasq will assume | 
				
			|||
# that these two Ethernet interfaces will never be in use at the same | 
				
			|||
# time, and give the IP address to the second, even if it is already | 
				
			|||
# in use by the first. Useful for laptops with wired and wireless | 
				
			|||
# addresses. | 
				
			|||
#dhcp-host=11:22:33:44:55:66,12:34:56:78:90:12,192.168.0.60 | 
				
			|||
 | 
				
			|||
# Give the machine which says its name is "bert" IP address | 
				
			|||
# 192.168.0.70 and an infinite lease | 
				
			|||
#dhcp-host=bert,192.168.0.70,infinite | 
				
			|||
 | 
				
			|||
# Always give the host with client identifier 01:02:02:04 | 
				
			|||
# the IP address 192.168.0.60 | 
				
			|||
#dhcp-host=id:01:02:02:04,192.168.0.60 | 
				
			|||
 | 
				
			|||
# Always give the Infiniband interface with hardware address | 
				
			|||
# 80:00:00:48:fe:80:00:00:00:00:00:00:f4:52:14:03:00:28:05:81 the | 
				
			|||
# ip address 192.168.0.61. The client id is derived from the prefix | 
				
			|||
# ff:00:00:00:00:00:02:00:00:02:c9:00 and the last 8 pairs of | 
				
			|||
# hex digits of the hardware address. | 
				
			|||
#dhcp-host=id:ff:00:00:00:00:00:02:00:00:02:c9:00:f4:52:14:03:00:28:05:81,192.168.0.61 | 
				
			|||
 | 
				
			|||
# Always give the host with client identifier "marjorie" | 
				
			|||
# the IP address 192.168.0.60 | 
				
			|||
#dhcp-host=id:marjorie,192.168.0.60 | 
				
			|||
 | 
				
			|||
# Enable the address given for "judge" in /etc/hosts | 
				
			|||
# to be given to a machine presenting the name "judge" when | 
				
			|||
# it asks for a DHCP lease. | 
				
			|||
#dhcp-host=judge | 
				
			|||
 | 
				
			|||
# Never offer DHCP service to a machine whose Ethernet | 
				
			|||
# address is 11:22:33:44:55:66 | 
				
			|||
#dhcp-host=11:22:33:44:55:66,ignore | 
				
			|||
 | 
				
			|||
# Ignore any client-id presented by the machine with Ethernet | 
				
			|||
# address 11:22:33:44:55:66. This is useful to prevent a machine | 
				
			|||
# being treated differently when running under different OS's or | 
				
			|||
# between PXE boot and OS boot. | 
				
			|||
#dhcp-host=11:22:33:44:55:66,id:* | 
				
			|||
 | 
				
			|||
# Send extra options which are tagged as "red" to | 
				
			|||
# the machine with Ethernet address 11:22:33:44:55:66 | 
				
			|||
#dhcp-host=11:22:33:44:55:66,set:red | 
				
			|||
 | 
				
			|||
# Send extra options which are tagged as "red" to | 
				
			|||
# any machine with Ethernet address starting 11:22:33: | 
				
			|||
#dhcp-host=11:22:33:*:*:*,set:red | 
				
			|||
 | 
				
			|||
# Give a fixed IPv6 address and name to client with  | 
				
			|||
# DUID 00:01:00:01:16:d2:83:fc:92:d4:19:e2:d8:b2 | 
				
			|||
# Note the MAC addresses CANNOT be used to identify DHCPv6 clients. | 
				
			|||
# Note also the they [] around the IPv6 address are obilgatory. | 
				
			|||
#dhcp-host=id:00:01:00:01:16:d2:83:fc:92:d4:19:e2:d8:b2, fred, [1234::5]  | 
				
			|||
 | 
				
			|||
# Ignore any clients which are not specified in dhcp-host lines | 
				
			|||
# or /etc/ethers. Equivalent to ISC "deny unknown-clients". | 
				
			|||
# This relies on the special "known" tag which is set when | 
				
			|||
# a host is matched. | 
				
			|||
#dhcp-ignore=tag:!known | 
				
			|||
 | 
				
			|||
# Send extra options which are tagged as "red" to any machine whose | 
				
			|||
# DHCP vendorclass string includes the substring "Linux" | 
				
			|||
#dhcp-vendorclass=set:red,Linux | 
				
			|||
 | 
				
			|||
# Send extra options which are tagged as "red" to any machine one | 
				
			|||
# of whose DHCP userclass strings includes the substring "accounts" | 
				
			|||
#dhcp-userclass=set:red,accounts | 
				
			|||
 | 
				
			|||
# Send extra options which are tagged as "red" to any machine whose | 
				
			|||
# MAC address matches the pattern. | 
				
			|||
#dhcp-mac=set:red,00:60:8C:*:*:* | 
				
			|||
 | 
				
			|||
# If this line is uncommented, dnsmasq will read /etc/ethers and act | 
				
			|||
# on the ethernet-address/IP pairs found there just as if they had | 
				
			|||
# been given as --dhcp-host options. Useful if you keep | 
				
			|||
# MAC-address/host mappings there for other purposes. | 
				
			|||
#read-ethers | 
				
			|||
 | 
				
			|||
# Send options to hosts which ask for a DHCP lease. | 
				
			|||
# See RFC 2132 for details of available options. | 
				
			|||
# Common options can be given to dnsmasq by name: | 
				
			|||
# run "dnsmasq --help dhcp" to get a list. | 
				
			|||
# Note that all the common settings, such as netmask and | 
				
			|||
# broadcast address, DNS server and default route, are given | 
				
			|||
# sane defaults by dnsmasq. You very likely will not need | 
				
			|||
# any dhcp-options. If you use Windows clients and Samba, there | 
				
			|||
# are some options which are recommended, they are detailed at the | 
				
			|||
# end of this section. | 
				
			|||
 | 
				
			|||
# Override the default route supplied by dnsmasq, which assumes the | 
				
			|||
# router is the same machine as the one running dnsmasq. | 
				
			|||
#dhcp-option=3,1.2.3.4 | 
				
			|||
 | 
				
			|||
# Do the same thing, but using the option name | 
				
			|||
#dhcp-option=option:router,1.2.3.4 | 
				
			|||
 | 
				
			|||
# Override the default route supplied by dnsmasq and send no default | 
				
			|||
# route at all. Note that this only works for the options sent by | 
				
			|||
# default (1, 3, 6, 12, 28) the same line will send a zero-length option | 
				
			|||
# for all other option numbers. | 
				
			|||
#dhcp-option=3 | 
				
			|||
 | 
				
			|||
# Set the NTP time server addresses to 192.168.0.4 and 10.10.0.5 | 
				
			|||
#dhcp-option=option:ntp-server,192.168.0.4,10.10.0.5 | 
				
			|||
 | 
				
			|||
# Send DHCPv6 option. Note [] around IPv6 addresses. | 
				
			|||
#dhcp-option=option6:dns-server,[1234::77],[1234::88] | 
				
			|||
 | 
				
			|||
# Send DHCPv6 option for namservers as the machine running  | 
				
			|||
# dnsmasq and another. | 
				
			|||
#dhcp-option=option6:dns-server,[::],[1234::88] | 
				
			|||
 | 
				
			|||
# Ask client to poll for option changes every six hours. (RFC4242) | 
				
			|||
#dhcp-option=option6:information-refresh-time,6h | 
				
			|||
 | 
				
			|||
# Set option 58 client renewal time (T1). Defaults to half of the | 
				
			|||
# lease time if not specified. (RFC2132) | 
				
			|||
#dhcp-option=option:T1:1m | 
				
			|||
 | 
				
			|||
# Set option 59 rebinding time (T2). Defaults to 7/8 of the | 
				
			|||
# lease time if not specified. (RFC2132) | 
				
			|||
#dhcp-option=option:T2:2m | 
				
			|||
 | 
				
			|||
# Set the NTP time server address to be the same machine as | 
				
			|||
# is running dnsmasq | 
				
			|||
#dhcp-option=42,0.0.0.0 | 
				
			|||
 | 
				
			|||
# Set the NIS domain name to "welly" | 
				
			|||
#dhcp-option=40,welly | 
				
			|||
 | 
				
			|||
# Set the default time-to-live to 50 | 
				
			|||
#dhcp-option=23,50 | 
				
			|||
 | 
				
			|||
# Set the "all subnets are local" flag | 
				
			|||
#dhcp-option=27,1 | 
				
			|||
 | 
				
			|||
# Send the etherboot magic flag and then etherboot options (a string). | 
				
			|||
#dhcp-option=128,e4:45:74:68:00:00 | 
				
			|||
#dhcp-option=129,NIC=eepro100 | 
				
			|||
 | 
				
			|||
# Specify an option which will only be sent to the "red" network | 
				
			|||
# (see dhcp-range for the declaration of the "red" network) | 
				
			|||
# Note that the tag: part must precede the option: part. | 
				
			|||
#dhcp-option = tag:red, option:ntp-server, 192.168.1.1 | 
				
			|||
 | 
				
			|||
# The following DHCP options set up dnsmasq in the same way as is specified | 
				
			|||
# for the ISC dhcpcd in | 
				
			|||
# http://www.samba.org/samba/ftp/docs/textdocs/DHCP-Server-Configuration.txt | 
				
			|||
# adapted for a typical dnsmasq installation where the host running | 
				
			|||
# dnsmasq is also the host running samba. | 
				
			|||
# you may want to uncomment some or all of them if you use | 
				
			|||
# Windows clients and Samba. | 
				
			|||
#dhcp-option=19,0           # option ip-forwarding off | 
				
			|||
#dhcp-option=44,0.0.0.0     # set netbios-over-TCP/IP nameserver(s) aka WINS server(s) | 
				
			|||
#dhcp-option=45,0.0.0.0     # netbios datagram distribution server | 
				
			|||
#dhcp-option=46,8           # netbios node type | 
				
			|||
 | 
				
			|||
# Send an empty WPAD option. This may be REQUIRED to get windows 7 to behave. | 
				
			|||
#dhcp-option=252,"\n" | 
				
			|||
 | 
				
			|||
# Send RFC-3397 DNS domain search DHCP option. WARNING: Your DHCP client | 
				
			|||
# probably doesn't support this...... | 
				
			|||
#dhcp-option=option:domain-search,eng.apple.com,marketing.apple.com | 
				
			|||
 | 
				
			|||
# Send RFC-3442 classless static routes (note the netmask encoding) | 
				
			|||
#dhcp-option=121,192.168.1.0/24,1.2.3.4,10.0.0.0/8,5.6.7.8 | 
				
			|||
 | 
				
			|||
# Send vendor-class specific options encapsulated in DHCP option 43. | 
				
			|||
# The meaning of the options is defined by the vendor-class so | 
				
			|||
# options are sent only when the client supplied vendor class | 
				
			|||
# matches the class given here. (A substring match is OK, so "MSFT" | 
				
			|||
# matches "MSFT" and "MSFT 5.0"). This example sets the | 
				
			|||
# mtftp address to 0.0.0.0 for PXEClients. | 
				
			|||
#dhcp-option=vendor:PXEClient,1,0.0.0.0 | 
				
			|||
 | 
				
			|||
# Send microsoft-specific option to tell windows to release the DHCP lease | 
				
			|||
# when it shuts down. Note the "i" flag, to tell dnsmasq to send the | 
				
			|||
# value as a four-byte integer - that's what microsoft wants. See | 
				
			|||
# http://technet2.microsoft.com/WindowsServer/en/library/a70f1bb7-d2d4-49f0-96d6-4b7414ecfaae1033.mspx?mfr=true | 
				
			|||
#dhcp-option=vendor:MSFT,2,1i | 
				
			|||
 | 
				
			|||
# Send the Encapsulated-vendor-class ID needed by some configurations of | 
				
			|||
# Etherboot to allow is to recognise the DHCP server. | 
				
			|||
#dhcp-option=vendor:Etherboot,60,"Etherboot" | 
				
			|||
 | 
				
			|||
# Send options to PXELinux. Note that we need to send the options even | 
				
			|||
# though they don't appear in the parameter request list, so we need | 
				
			|||
# to use dhcp-option-force here. | 
				
			|||
# See http://syslinux.zytor.com/pxe.php#special for details. | 
				
			|||
# Magic number - needed before anything else is recognised | 
				
			|||
#dhcp-option-force=208,f1:00:74:7e | 
				
			|||
# Configuration file name | 
				
			|||
#dhcp-option-force=209,configs/common | 
				
			|||
# Path prefix | 
				
			|||
#dhcp-option-force=210,/tftpboot/pxelinux/files/ | 
				
			|||
# Reboot time. (Note 'i' to send 32-bit value) | 
				
			|||
#dhcp-option-force=211,30i | 
				
			|||
 | 
				
			|||
# Set the boot filename for netboot/PXE. You will only need | 
				
			|||
# this is you want to boot machines over the network and you will need | 
				
			|||
# a TFTP server; either dnsmasq's built in TFTP server or an | 
				
			|||
# external one. (See below for how to enable the TFTP server.) | 
				
			|||
#dhcp-boot=pxelinux.0 | 
				
			|||
 | 
				
			|||
# The same as above, but use custom tftp-server instead machine running dnsmasq | 
				
			|||
#dhcp-boot=pxelinux,server.name,192.168.1.100 | 
				
			|||
 | 
				
			|||
# Boot for Etherboot gPXE. The idea is to send two different | 
				
			|||
# filenames, the first loads gPXE, and the second tells gPXE what to | 
				
			|||
# load. The dhcp-match sets the gpxe tag for requests from gPXE. | 
				
			|||
#dhcp-match=set:gpxe,175 # gPXE sends a 175 option. | 
				
			|||
#dhcp-boot=tag:!gpxe,undionly.kpxe | 
				
			|||
#dhcp-boot=mybootimage | 
				
			|||
 | 
				
			|||
# Encapsulated options for Etherboot gPXE. All the options are | 
				
			|||
# encapsulated within option 175 | 
				
			|||
#dhcp-option=encap:175, 1, 5b         # priority code | 
				
			|||
#dhcp-option=encap:175, 176, 1b       # no-proxydhcp | 
				
			|||
#dhcp-option=encap:175, 177, string   # bus-id | 
				
			|||
#dhcp-option=encap:175, 189, 1b       # BIOS drive code | 
				
			|||
#dhcp-option=encap:175, 190, user     # iSCSI username | 
				
			|||
#dhcp-option=encap:175, 191, pass     # iSCSI password | 
				
			|||
 | 
				
			|||
# Test for the architecture of a netboot client. PXE clients are | 
				
			|||
# supposed to send their architecture as option 93. (See RFC 4578) | 
				
			|||
#dhcp-match=peecees, option:client-arch, 0 #x86-32 | 
				
			|||
#dhcp-match=itanics, option:client-arch, 2 #IA64 | 
				
			|||
#dhcp-match=hammers, option:client-arch, 6 #x86-64 | 
				
			|||
#dhcp-match=mactels, option:client-arch, 7 #EFI x86-64 | 
				
			|||
 | 
				
			|||
# Do real PXE, rather than just booting a single file, this is an | 
				
			|||
# alternative to dhcp-boot. | 
				
			|||
#pxe-prompt="What system shall I netboot?" | 
				
			|||
# or with timeout before first available action is taken: | 
				
			|||
#pxe-prompt="Press F8 for menu.", 60 | 
				
			|||
 | 
				
			|||
# Available boot services. for PXE. | 
				
			|||
#pxe-service=x86PC, "Boot from local disk" | 
				
			|||
 | 
				
			|||
# Loads <tftp-root>/pxelinux.0 from dnsmasq TFTP server. | 
				
			|||
#pxe-service=x86PC, "Install Linux", pxelinux | 
				
			|||
 | 
				
			|||
# Loads <tftp-root>/pxelinux.0 from TFTP server at 1.2.3.4. | 
				
			|||
# Beware this fails on old PXE ROMS. | 
				
			|||
#pxe-service=x86PC, "Install Linux", pxelinux, 1.2.3.4 | 
				
			|||
 | 
				
			|||
# Use bootserver on network, found my multicast or broadcast. | 
				
			|||
#pxe-service=x86PC, "Install windows from RIS server", 1 | 
				
			|||
 | 
				
			|||
# Use bootserver at a known IP address. | 
				
			|||
#pxe-service=x86PC, "Install windows from RIS server", 1, 1.2.3.4 | 
				
			|||
 | 
				
			|||
# If you have multicast-FTP available, | 
				
			|||
# information for that can be passed in a similar way using options 1 | 
				
			|||
# to 5. See page 19 of | 
				
			|||
# http://download.intel.com/design/archives/wfm/downloads/pxespec.pdf | 
				
			|||
 | 
				
			|||
 | 
				
			|||
# Enable dnsmasq's built-in TFTP server | 
				
			|||
#enable-tftp | 
				
			|||
 | 
				
			|||
# Set the root directory for files available via FTP. | 
				
			|||
#tftp-root=/var/ftpd | 
				
			|||
 | 
				
			|||
# Do not abort if the tftp-root is unavailable | 
				
			|||
#tftp-no-fail | 
				
			|||
 | 
				
			|||
# Make the TFTP server more secure: with this set, only files owned by | 
				
			|||
# the user dnsmasq is running as will be send over the net. | 
				
			|||
#tftp-secure | 
				
			|||
 | 
				
			|||
# This option stops dnsmasq from negotiating a larger blocksize for TFTP | 
				
			|||
# transfers. It will slow things down, but may rescue some broken TFTP | 
				
			|||
# clients. | 
				
			|||
#tftp-no-blocksize | 
				
			|||
 | 
				
			|||
# Set the boot file name only when the "red" tag is set. | 
				
			|||
#dhcp-boot=tag:red,pxelinux.red-net | 
				
			|||
 | 
				
			|||
# An example of dhcp-boot with an external TFTP server: the name and IP | 
				
			|||
# address of the server are given after the filename. | 
				
			|||
# Can fail with old PXE ROMS. Overridden by --pxe-service. | 
				
			|||
#dhcp-boot=/var/ftpd/pxelinux.0,boothost,192.168.0.3 | 
				
			|||
 | 
				
			|||
# If there are multiple external tftp servers having a same name | 
				
			|||
# (using /etc/hosts) then that name can be specified as the | 
				
			|||
# tftp_servername (the third option to dhcp-boot) and in that | 
				
			|||
# case dnsmasq resolves this name and returns the resultant IP | 
				
			|||
# addresses in round robin fasion. This facility can be used to | 
				
			|||
# load balance the tftp load among a set of servers. | 
				
			|||
#dhcp-boot=/var/ftpd/pxelinux.0,boothost,tftp_server_name | 
				
			|||
 | 
				
			|||
# Set the limit on DHCP leases, the default is 150 | 
				
			|||
#dhcp-lease-max=150 | 
				
			|||
 | 
				
			|||
# The DHCP server needs somewhere on disk to keep its lease database. | 
				
			|||
# This defaults to a sane location, but if you want to change it, use | 
				
			|||
# the line below. | 
				
			|||
#dhcp-leasefile=/var/state/dnsmasq/dnsmasq.leases | 
				
			|||
 | 
				
			|||
# Set the DHCP server to authoritative mode. In this mode it will barge in | 
				
			|||
# and take over the lease for any client which broadcasts on the network, | 
				
			|||
# whether it has a record of the lease or not. This avoids long timeouts | 
				
			|||
# when a machine wakes up on a new network. DO NOT enable this if there's | 
				
			|||
# the slightest chance that you might end up accidentally configuring a DHCP | 
				
			|||
# server for your campus/company accidentally. The ISC server uses | 
				
			|||
# the same option, and this URL provides more information: | 
				
			|||
# http://www.isc.org/files/auth.html | 
				
			|||
#dhcp-authoritative | 
				
			|||
 | 
				
			|||
# Run an executable when a DHCP lease is created or destroyed. | 
				
			|||
# The arguments sent to the script are "add" or "del", | 
				
			|||
# then the MAC address, the IP address and finally the hostname | 
				
			|||
# if there is one. | 
				
			|||
#dhcp-script=/bin/echo | 
				
			|||
 | 
				
			|||
# Set the cachesize here. | 
				
			|||
#cache-size=150 | 
				
			|||
 | 
				
			|||
# If you want to disable negative caching, uncomment this. | 
				
			|||
#no-negcache | 
				
			|||
 | 
				
			|||
# Normally responses which come from /etc/hosts and the DHCP lease | 
				
			|||
# file have Time-To-Live set as zero, which conventionally means | 
				
			|||
# do not cache further. If you are happy to trade lower load on the | 
				
			|||
# server for potentially stale date, you can set a time-to-live (in | 
				
			|||
# seconds) here. | 
				
			|||
#local-ttl= | 
				
			|||
 | 
				
			|||
# If you want dnsmasq to detect attempts by Verisign to send queries | 
				
			|||
# to unregistered .com and .net hosts to its sitefinder service and | 
				
			|||
# have dnsmasq instead return the correct NXDOMAIN response, uncomment | 
				
			|||
# this line. You can add similar lines to do the same for other | 
				
			|||
# registries which have implemented wildcard A records. | 
				
			|||
#bogus-nxdomain=64.94.110.11 | 
				
			|||
 | 
				
			|||
# If you want to fix up DNS results from upstream servers, use the | 
				
			|||
# alias option. This only works for IPv4. | 
				
			|||
# This alias makes a result of 1.2.3.4 appear as 5.6.7.8 | 
				
			|||
#alias=1.2.3.4,5.6.7.8 | 
				
			|||
# and this maps 1.2.3.x to 5.6.7.x | 
				
			|||
#alias=1.2.3.0,5.6.7.0,255.255.255.0 | 
				
			|||
# and this maps 192.168.0.10->192.168.0.40 to 10.0.0.10->10.0.0.40 | 
				
			|||
#alias=192.168.0.10-192.168.0.40,10.0.0.0,255.255.255.0 | 
				
			|||
 | 
				
			|||
# Change these lines if you want dnsmasq to serve MX records. | 
				
			|||
 | 
				
			|||
# Return an MX record named "maildomain.com" with target | 
				
			|||
# servermachine.com and preference 50 | 
				
			|||
#mx-host=maildomain.com,servermachine.com,50 | 
				
			|||
 | 
				
			|||
# Set the default target for MX records created using the localmx option. | 
				
			|||
#mx-target=servermachine.com | 
				
			|||
 | 
				
			|||
# Return an MX record pointing to the mx-target for all local | 
				
			|||
# machines. | 
				
			|||
#localmx | 
				
			|||
 | 
				
			|||
# Return an MX record pointing to itself for all local machines. | 
				
			|||
#selfmx | 
				
			|||
 | 
				
			|||
# Change the following lines if you want dnsmasq to serve SRV | 
				
			|||
# records.  These are useful if you want to serve ldap requests for | 
				
			|||
# Active Directory and other windows-originated DNS requests. | 
				
			|||
# See RFC 2782. | 
				
			|||
# You may add multiple srv-host lines. | 
				
			|||
# The fields are <name>,<target>,<port>,<priority>,<weight> | 
				
			|||
# If the domain part if missing from the name (so that is just has the | 
				
			|||
# service and protocol sections) then the domain given by the domain= | 
				
			|||
# config option is used. (Note that expand-hosts does not need to be | 
				
			|||
# set for this to work.) | 
				
			|||
 | 
				
			|||
# A SRV record sending LDAP for the example.com domain to | 
				
			|||
# ldapserver.example.com port 389 | 
				
			|||
#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389 | 
				
			|||
 | 
				
			|||
# A SRV record sending LDAP for the example.com domain to | 
				
			|||
# ldapserver.example.com port 389 (using domain=) | 
				
			|||
#domain=example.com | 
				
			|||
#srv-host=_ldap._tcp,ldapserver.example.com,389 | 
				
			|||
 | 
				
			|||
# Two SRV records for LDAP, each with different priorities | 
				
			|||
#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,1 | 
				
			|||
#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,2 | 
				
			|||
 | 
				
			|||
# A SRV record indicating that there is no LDAP server for the domain | 
				
			|||
# example.com | 
				
			|||
#srv-host=_ldap._tcp.example.com | 
				
			|||
 | 
				
			|||
# The following line shows how to make dnsmasq serve an arbitrary PTR | 
				
			|||
# record. This is useful for DNS-SD. (Note that the | 
				
			|||
# domain-name expansion done for SRV records _does_not | 
				
			|||
# occur for PTR records.) | 
				
			|||
#ptr-record=_http._tcp.dns-sd-services,"New Employee Page._http._tcp.dns-sd-services" | 
				
			|||
 | 
				
			|||
# Change the following lines to enable dnsmasq to serve TXT records. | 
				
			|||
# These are used for things like SPF and zeroconf. (Note that the | 
				
			|||
# domain-name expansion done for SRV records _does_not | 
				
			|||
# occur for TXT records.) | 
				
			|||
 | 
				
			|||
#Example SPF. | 
				
			|||
#txt-record=example.com,"v=spf1 a -all" | 
				
			|||
 | 
				
			|||
#Example zeroconf | 
				
			|||
#txt-record=_http._tcp.example.com,name=value,paper=A4 | 
				
			|||
 | 
				
			|||
# Provide an alias for a "local" DNS name. Note that this _only_ works | 
				
			|||
# for targets which are names from DHCP or /etc/hosts. Give host | 
				
			|||
# "bert" another name, bertrand | 
				
			|||
#cname=bertand,bert | 
				
			|||
 | 
				
			|||
# For debugging purposes, log each DNS query as it passes through | 
				
			|||
# dnsmasq. | 
				
			|||
#log-queries | 
				
			|||
 | 
				
			|||
# Log lots of extra information about DHCP transactions. | 
				
			|||
#log-dhcp | 
				
			|||
 | 
				
			|||
# Include another lot of configuration options. | 
				
			|||
#conf-file=/etc/dnsmasq.more.conf | 
				
			|||
#conf-dir=/etc/dnsmasq.d | 
				
			|||
 | 
				
			|||
# Include all the files in a directory except those ending in .bak | 
				
			|||
#conf-dir=/etc/dnsmasq.d,.bak | 
				
			|||
 | 
				
			|||
# Include all files in a directory which end in .conf | 
				
			|||
#conf-dir=/etc/dnsmasq.d/,*.conf | 
				
			|||
@ -0,0 +1 @@ | 
				
			|||
../conf.avail/10-sub-pixel-rgb.conf | 
				
			|||
@ -0,0 +1 @@ | 
				
			|||
../conf.avail/11-lcdfilter-default.conf | 
				
			|||
@ -0,0 +1 @@ | 
				
			|||
../conf.avail/70-no-bitmaps.conf | 
				
			|||
@ -0,0 +1,22 @@ | 
				
			|||
<?xml version="1.0"?> | 
				
			|||
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> | 
				
			|||
<fontconfig> | 
				
			|||
    <alias> | 
				
			|||
        <family>sans-serif</family> | 
				
			|||
        <prefer> | 
				
			|||
            <family>DejaVu Sans</family> | 
				
			|||
        </prefer> | 
				
			|||
    </alias> | 
				
			|||
    <alias> | 
				
			|||
        <family>serif</family> | 
				
			|||
        <prefer> | 
				
			|||
            <family>DejaVu Serif</family> | 
				
			|||
        </prefer> | 
				
			|||
    </alias> | 
				
			|||
    <alias> | 
				
			|||
        <family>monospace</family> | 
				
			|||
        <prefer> | 
				
			|||
            <family>DejaVu Sans Mono</family> | 
				
			|||
        </prefer> | 
				
			|||
    </alias> | 
				
			|||
</fontconfig> | 
				
			|||
@ -0,0 +1,72 @@ | 
				
			|||
# Sample /etc/ntp.conf:  Configuration file for ntpd. | 
				
			|||
# | 
				
			|||
# Undisciplined Local Clock. This is a fake driver intended for backup | 
				
			|||
# and when no outside source of synchronized time is available. The | 
				
			|||
# default stratum is usually 3, but in this case we elect to use stratum | 
				
			|||
# 0. Since the server line does not have the prefer keyword, this driver | 
				
			|||
# is never used for synchronization, unless no other other | 
				
			|||
# synchronization source is available. In case the local host is | 
				
			|||
# controlled by some external source, such as an external oscillator or | 
				
			|||
# another protocol, the prefer keyword would cause the local host to | 
				
			|||
# disregard all other synchronization sources, unless the kernel | 
				
			|||
# modifications are in use and declare an unsynchronized condition. | 
				
			|||
# | 
				
			|||
server	127.127.1.0	# local clock | 
				
			|||
fudge	127.127.1.0 stratum 10	 | 
				
			|||
 | 
				
			|||
# | 
				
			|||
# NTP server (list one or more) to synchronize with: | 
				
			|||
server 0.pool.ntp.org iburst | 
				
			|||
server 1.pool.ntp.org iburst | 
				
			|||
server 2.pool.ntp.org iburst | 
				
			|||
server 3.pool.ntp.org iburst | 
				
			|||
 | 
				
			|||
# | 
				
			|||
# Drift file.  Put this in a directory which the daemon can write to. | 
				
			|||
# No symbolic links allowed, either, since the daemon updates the file | 
				
			|||
# by creating a temporary in the same directory and then rename()'ing | 
				
			|||
# it to the file. | 
				
			|||
# | 
				
			|||
driftfile /etc/ntp/drift | 
				
			|||
 | 
				
			|||
# | 
				
			|||
# Uncomment to use a multicast NTP server on the local subnet: | 
				
			|||
#multicastclient 224.0.1.1		# listen on default 224.0.1.1 | 
				
			|||
# Set an optional compensation for broadcast packet delay: | 
				
			|||
#broadcastdelay	0.008 | 
				
			|||
 | 
				
			|||
# | 
				
			|||
# Keys file.  If you want to diddle your server at run time, make a | 
				
			|||
# keys file (mode 600 for sure) and define the key number to be | 
				
			|||
# used for making requests. | 
				
			|||
# PLEASE DO NOT USE THE DEFAULT VALUES HERE. Pick your own, or remote | 
				
			|||
# systems might be able to reset your clock at will. | 
				
			|||
# | 
				
			|||
#keys		/etc/ntp/keys | 
				
			|||
#trustedkey	65535 | 
				
			|||
#requestkey	65535 | 
				
			|||
#controlkey	65535 | 
				
			|||
 | 
				
			|||
# | 
				
			|||
# Don't serve time or stats to anyone else by default (more secure) | 
				
			|||
restrict default limited kod nomodify notrap nopeer noquery | 
				
			|||
restrict -6 default limited kod nomodify notrap nopeer noquery | 
				
			|||
 | 
				
			|||
# | 
				
			|||
# Use these lines instead if you do want to serve time and stats to | 
				
			|||
# other machines on the network: | 
				
			|||
#restrict default limited kod nomodify notrap nopeer | 
				
			|||
#restrict -6 default limited kod nomodify notrap nopeer | 
				
			|||
 | 
				
			|||
# | 
				
			|||
# Disable the ntpdc -c monlist command, which is insecure and can be used | 
				
			|||
# to cause a denial of service attack (CVE-2013-5211). Future versions of | 
				
			|||
# NTP will remove this command. | 
				
			|||
# (this feature was disabled by default with ntpd 4.2.7p230) | 
				
			|||
disable monitor | 
				
			|||
 | 
				
			|||
# | 
				
			|||
# Trust ourselves.  :-) | 
				
			|||
restrict 127.0.0.1 | 
				
			|||
restrict ::1 | 
				
			|||
 | 
				
			|||
@ -0,0 +1,72 @@ | 
				
			|||
# Sample /etc/ntp.conf:  Configuration file for ntpd. | 
				
			|||
# | 
				
			|||
# Undisciplined Local Clock. This is a fake driver intended for backup | 
				
			|||
# and when no outside source of synchronized time is available. The | 
				
			|||
# default stratum is usually 3, but in this case we elect to use stratum | 
				
			|||
# 0. Since the server line does not have the prefer keyword, this driver | 
				
			|||
# is never used for synchronization, unless no other other | 
				
			|||
# synchronization source is available. In case the local host is | 
				
			|||
# controlled by some external source, such as an external oscillator or | 
				
			|||
# another protocol, the prefer keyword would cause the local host to | 
				
			|||
# disregard all other synchronization sources, unless the kernel | 
				
			|||
# modifications are in use and declare an unsynchronized condition. | 
				
			|||
# | 
				
			|||
server	127.127.1.0	# local clock | 
				
			|||
fudge	127.127.1.0 stratum 10	 | 
				
			|||
 | 
				
			|||
# | 
				
			|||
# NTP server (list one or more) to synchronize with: | 
				
			|||
#server 0.pool.ntp.org iburst | 
				
			|||
#server 1.pool.ntp.org iburst | 
				
			|||
#server 2.pool.ntp.org iburst | 
				
			|||
#server 3.pool.ntp.org iburst | 
				
			|||
 | 
				
			|||
# | 
				
			|||
# Drift file.  Put this in a directory which the daemon can write to. | 
				
			|||
# No symbolic links allowed, either, since the daemon updates the file | 
				
			|||
# by creating a temporary in the same directory and then rename()'ing | 
				
			|||
# it to the file. | 
				
			|||
# | 
				
			|||
driftfile /etc/ntp/drift | 
				
			|||
 | 
				
			|||
# | 
				
			|||
# Uncomment to use a multicast NTP server on the local subnet: | 
				
			|||
#multicastclient 224.0.1.1		# listen on default 224.0.1.1 | 
				
			|||
# Set an optional compensation for broadcast packet delay: | 
				
			|||
#broadcastdelay	0.008 | 
				
			|||
 | 
				
			|||
# | 
				
			|||
# Keys file.  If you want to diddle your server at run time, make a | 
				
			|||
# keys file (mode 600 for sure) and define the key number to be | 
				
			|||
# used for making requests. | 
				
			|||
# PLEASE DO NOT USE THE DEFAULT VALUES HERE. Pick your own, or remote | 
				
			|||
# systems might be able to reset your clock at will. | 
				
			|||
# | 
				
			|||
#keys		/etc/ntp/keys | 
				
			|||
#trustedkey	65535 | 
				
			|||
#requestkey	65535 | 
				
			|||
#controlkey	65535 | 
				
			|||
 | 
				
			|||
# | 
				
			|||
# Don't serve time or stats to anyone else by default (more secure) | 
				
			|||
restrict default limited kod nomodify notrap nopeer noquery | 
				
			|||
restrict -6 default limited kod nomodify notrap nopeer noquery | 
				
			|||
 | 
				
			|||
# | 
				
			|||
# Use these lines instead if you do want to serve time and stats to | 
				
			|||
# other machines on the network: | 
				
			|||
#restrict default limited kod nomodify notrap nopeer | 
				
			|||
#restrict -6 default limited kod nomodify notrap nopeer | 
				
			|||
 | 
				
			|||
# | 
				
			|||
# Disable the ntpdc -c monlist command, which is insecure and can be used | 
				
			|||
# to cause a denial of service attack (CVE-2013-5211). Future versions of | 
				
			|||
# NTP will remove this command. | 
				
			|||
# (this feature was disabled by default with ntpd 4.2.7p230) | 
				
			|||
disable monitor | 
				
			|||
 | 
				
			|||
# | 
				
			|||
# Trust ourselves.  :-) | 
				
			|||
restrict 127.0.0.1 | 
				
			|||
restrict ::1 | 
				
			|||
 | 
				
			|||
@ -0,0 +1,2 @@ | 
				
			|||
# Unset the LESS variable to prevent problems with some programs | 
				
			|||
unset LESS | 
				
			|||
@ -0,0 +1,4 @@ | 
				
			|||
# Add sbin paths for wheel users | 
				
			|||
if groups | grep -q '\bwheel\b'; then | 
				
			|||
    export PATH="/usr/local/sbin:/usr/sbin:/sbin:$PATH" | 
				
			|||
fi | 
				
			|||
@ -0,0 +1,6 @@ | 
				
			|||
# Create/Set XDG_RUNTIME_DIR | 
				
			|||
if [ ! "$XDG_RUNTIME_DIR" ]; then | 
				
			|||
    export XDG_RUNTIME_DIR="/run/user/$(id -u)" | 
				
			|||
    mkdir -p "$XDG_RUNTIME_DIR" | 
				
			|||
    chmod 700 "$XDG_RUNTIME_DIR" | 
				
			|||
fi | 
				
			|||
@ -0,0 +1,310 @@ | 
				
			|||
#! /bin/sh | 
				
			|||
# | 
				
			|||
# rc.6		This file is executed by init when it goes into runlevel | 
				
			|||
#		0 (halt) or runlevel 6 (reboot). It kills all processes, | 
				
			|||
#		unmounts file systems and then either halts or reboots. | 
				
			|||
# | 
				
			|||
# Version:	@(#)/etc/rc.d/rc.6	2.47 Sat Jan 13 13:37:26 PST 2001 | 
				
			|||
# | 
				
			|||
# Author:	Miquel van Smoorenburg <miquels@drinkel.nl.mugnet.org> | 
				
			|||
# Modified by:  Patrick J. Volkerding, <volkerdi@slackware.com> | 
				
			|||
# | 
				
			|||
 | 
				
			|||
# Set the path. | 
				
			|||
PATH=/sbin:/etc:/bin:/usr/bin | 
				
			|||
 | 
				
			|||
# If there are SystemV init scripts for this runlevel, run them. | 
				
			|||
if [ -x /etc/rc.d/rc.sysvinit ]; then | 
				
			|||
  . /etc/rc.d/rc.sysvinit | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Set linefeed mode to avoid staircase effect. | 
				
			|||
/bin/stty onlcr | 
				
			|||
 | 
				
			|||
echo "Running shutdown script $0:" | 
				
			|||
 | 
				
			|||
# Find out how we were called. | 
				
			|||
case "$0" in | 
				
			|||
	*0) | 
				
			|||
		shutdown_command="halt" | 
				
			|||
		;; | 
				
			|||
	*6) | 
				
			|||
		shutdown_command=reboot | 
				
			|||
		;; | 
				
			|||
	*) | 
				
			|||
		echo "$0: call me as \"rc.0\" or \"rc.6\" please!" | 
				
			|||
		exit 1 | 
				
			|||
		;; | 
				
			|||
esac | 
				
			|||
 | 
				
			|||
# Save the system time to the hardware clock using hwclock --systohc. | 
				
			|||
# This will also create or update the timestamps in /etc/adjtime. | 
				
			|||
if [ -x /sbin/hwclock ]; then | 
				
			|||
  # Check for a broken motherboard RTC clock (where ioports for rtc are | 
				
			|||
  # unknown) to prevent hwclock causing a hang: | 
				
			|||
  if ! grep -q " : rtc" /proc/ioports ; then | 
				
			|||
    CLOCK_OPT="--directisa" | 
				
			|||
  fi | 
				
			|||
  if [ /etc/adjtime -nt /etc/hardwareclock ]; then | 
				
			|||
    if grep -q "^LOCAL" /etc/adjtime ; then | 
				
			|||
      echo "Saving system time to the hardware clock (localtime)." | 
				
			|||
    else | 
				
			|||
      echo "Saving system time to the hardware clock (UTC)." | 
				
			|||
    fi | 
				
			|||
    /sbin/hwclock $CLOCK_OPT --systohc | 
				
			|||
  elif grep -q "^UTC" /etc/hardwareclock 2> /dev/null ; then | 
				
			|||
    echo "Saving system time to the hardware clock (UTC)." | 
				
			|||
    if [ ! -r /etc/adjtime ]; then | 
				
			|||
      echo "Creating system time correction file /etc/adjtime." | 
				
			|||
    fi | 
				
			|||
    /sbin/hwclock $CLOCK_OPT --utc --systohc | 
				
			|||
  else | 
				
			|||
    echo "Saving system time to the hardware clock (localtime)." | 
				
			|||
    if [ ! -r /etc/adjtime ]; then | 
				
			|||
      echo "Creating system time correction file /etc/adjtime." | 
				
			|||
    fi | 
				
			|||
    /sbin/hwclock $CLOCK_OPT --localtime --systohc | 
				
			|||
  fi | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Save the current alsa mixer settings: | 
				
			|||
if [ -x /etc/rc.d/rc.alsa -a -d /proc/asound ]; then | 
				
			|||
    echo "Storing ALSA mixer settings:  /usr/sbin/alsactl store" | 
				
			|||
    /usr/sbin/alsactl store | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Run any local shutdown scripts: | 
				
			|||
if [ -x /etc/rc.d/rc.local_shutdown ]; then | 
				
			|||
  /etc/rc.d/rc.local_shutdown stop | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Stop Profile-sync-daemon: | 
				
			|||
if [ -x /etc/rc.d/rc.psd ]; then | 
				
			|||
  /etc/rc.d/rc.psd stop | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Stop the Apache web server: | 
				
			|||
if [ -x /etc/rc.d/rc.httpd ]; then | 
				
			|||
  /etc/rc.d/rc.httpd stop | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Stop the MySQL database: | 
				
			|||
if [ -r /var/run/mysql/mysql.pid ]; then | 
				
			|||
  . /etc/rc.d/rc.mysqld stop | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Stop the Samba server: | 
				
			|||
if [ -x /etc/rc.d/rc.samba ]; then | 
				
			|||
  . /etc/rc.d/rc.samba stop | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Shut down the NFS server: | 
				
			|||
if [ -x /etc/rc.d/rc.nfsd ]; then | 
				
			|||
  /etc/rc.d/rc.nfsd stop | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Shut down the SSH server: | 
				
			|||
if [ -x /etc/rc.d/rc.sshd ]; then | 
				
			|||
  /etc/rc.d/rc.sshd stop | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Shut down the SASL authentication daemon: | 
				
			|||
if [ -x /etc/rc.d/rc.saslauthd ]; then | 
				
			|||
  /etc/rc.d/rc.saslauthd stop | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Shut down OpenLDAP: | 
				
			|||
if [ -x /etc/rc.d/rc.openldap ]; then | 
				
			|||
  /etc/rc.d/rc.openldap stop | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Stop D-Bus: | 
				
			|||
if [ -x /etc/rc.d/rc.messagebus ]; then | 
				
			|||
  sh /etc/rc.d/rc.messagebus stop | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Kill any processes (typically gam) that would otherwise prevent | 
				
			|||
# unmounting NFS volumes: | 
				
			|||
unset FUSER_DELAY | 
				
			|||
for dir in $(/bin/mount | grep 'type nfs ' | cut -d ' ' -f 3 ) ; do | 
				
			|||
  echo "Killing processes holding NFS mount $dir open..." | 
				
			|||
  # Background this to prevent fuser from also blocking shutdown: | 
				
			|||
  /usr/bin/fuser -k -m $dir & | 
				
			|||
  FUSER_DELAY=5 | 
				
			|||
done | 
				
			|||
# If fuser was run, let it have some delay: | 
				
			|||
if [ ! -z "$FUSER_DELAY" ]; then | 
				
			|||
  sleep $FUSER_DELAY | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Unmount any NFS, SMB, or CIFS filesystems: | 
				
			|||
echo "Unmounting remote filesystems:" | 
				
			|||
/bin/umount -v -a -l -f -r -t nfs,smbfs,cifs | tr -d ' ' | grep successfully | sed "s/:successfullyunmounted/ has been successfully unmounted./g" | 
				
			|||
 | 
				
			|||
# Try to shut down pppd: | 
				
			|||
PS="$(ps ax)" | 
				
			|||
if echo "$PS" | /bin/grep -q -w pppd ; then | 
				
			|||
  if [ -x /usr/sbin/ppp-off ]; then | 
				
			|||
    /usr/sbin/ppp-off | 
				
			|||
  fi | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Shut down YP services: | 
				
			|||
if [ -x /etc/rc.d/rc.yp ]; then | 
				
			|||
  if grep -wq stop /etc/rc.d/rc.yp ; then | 
				
			|||
    /etc/rc.d/rc.yp stop | 
				
			|||
  fi | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Bring down the networking system, but first make sure that this | 
				
			|||
# isn't a diskless client with the / partition mounted via NFS: | 
				
			|||
if ! /bin/mount | /bin/grep -q 'on / type nfs' ; then | 
				
			|||
  if [ -x /etc/rc.d/rc.inet1 ]; then | 
				
			|||
    . /etc/rc.d/rc.inet1 stop | 
				
			|||
  fi | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# In case dhcpcd might have been manually started on the command line, | 
				
			|||
# look for the .pid file, and shut dhcpcd down if it's found: | 
				
			|||
if /bin/ls /etc/dhcpc/*.pid 1> /dev/null 2> /dev/null ; then | 
				
			|||
  /sbin/dhcpcd -k 1> /dev/null 2> /dev/null | 
				
			|||
  # A little time for /etc/resolv.conf and/or other files to | 
				
			|||
  # restore themselves. | 
				
			|||
  sleep 2 | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Shut down PCMCIA devices: | 
				
			|||
if [ -x /etc/rc.d/rc.pcmcia ]; then | 
				
			|||
  . /etc/rc.d/rc.pcmcia stop | 
				
			|||
  # The cards might need a little extra time here to deactivate: | 
				
			|||
  /bin/sleep 5 | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Turn off process accounting: | 
				
			|||
if [ -x /sbin/accton -a -r /var/log/pacct ]; then | 
				
			|||
  /sbin/accton off | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Terminate acpid before syslog: | 
				
			|||
if [ -x /etc/rc.d/rc.acpid -a -r /var/run/acpid.pid ]; then # quit | 
				
			|||
  . /etc/rc.d/rc.acpid stop | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Stop udev: | 
				
			|||
if [ -x /etc/rc.d/rc.udev ]; then | 
				
			|||
  sh /etc/rc.d/rc.udev force-stop | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Kill all remaining processes. | 
				
			|||
OMITPIDS="$(for p in $(pgrep mdmon); do echo -o $p; done)" # Don't kill mdmon | 
				
			|||
if [ ! "$1" = "fast" ]; then | 
				
			|||
  echo "Sending all processes the SIGTERM signal." | 
				
			|||
  /sbin/killall5 -15 $OMITPIDS | 
				
			|||
  /bin/sleep 5 | 
				
			|||
  echo "Sending all processes the SIGKILL signal." | 
				
			|||
  /sbin/killall5 -9 $OMITPIDS | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Try to turn off quota. | 
				
			|||
if /bin/grep -q quota /etc/fstab ; then | 
				
			|||
  if [ -x /sbin/quotaoff ]; then | 
				
			|||
    echo "Turning off filesystem quotas." | 
				
			|||
    /sbin/quotaoff -a | 
				
			|||
  fi | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Carry a random seed between reboots. | 
				
			|||
echo "Saving random seed from /dev/urandom in /etc/random-seed." | 
				
			|||
# Use the pool size from /proc, or 4096 bits: | 
				
			|||
if [ -r /proc/sys/kernel/random/poolsize ]; then | 
				
			|||
  /bin/dd if=/dev/urandom of=/etc/random-seed count=1 bs=$(expr $(cat /proc/sys/kernel/random/poolsize) / 8) 2> /dev/null | 
				
			|||
else | 
				
			|||
  /bin/dd if=/dev/urandom of=/etc/random-seed count=1 bs=512 2> /dev/null | 
				
			|||
fi | 
				
			|||
/bin/chmod 600 /etc/random-seed | 
				
			|||
 | 
				
			|||
# Before unmounting file systems write a reboot or halt record to wtmp. | 
				
			|||
$shutdown_command -w | 
				
			|||
 | 
				
			|||
# Turn off swap: | 
				
			|||
echo "Turning off swap." | 
				
			|||
/sbin/swapoff -a | 
				
			|||
/bin/sync | 
				
			|||
 | 
				
			|||
# Stop cgmanager and cgproxy: | 
				
			|||
if [ -x /etc/rc.d/rc.cgmanager ]; then | 
				
			|||
  sh /etc/rc.d/rc.cgmanager stop | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
echo "Unmounting local file systems:" | 
				
			|||
/bin/umount -v -a -t no,proc,sysfs | tr -d ' ' | grep successfully | sed "s/:successfullyunmounted/ has been successfully unmounted./g" 2> /dev/null | 
				
			|||
 | 
				
			|||
echo "Remounting root filesystem read-only:" | 
				
			|||
/bin/mount -v -n -o remount,ro / | 
				
			|||
 | 
				
			|||
# This never hurts: | 
				
			|||
/bin/sync | 
				
			|||
 | 
				
			|||
# Close any volumes opened by cryptsetup: | 
				
			|||
if [ -f /etc/crypttab -a -x /sbin/cryptsetup ]; then | 
				
			|||
  cat /etc/crypttab | grep -v "^#" | grep -v "^$" | while read line; do | 
				
			|||
    # NOTE: we only support LUKS formatted volumes (except for swap)! | 
				
			|||
    LUKS=$(echo $line | tr '\t' ' ' | tr -s ' ' | cut -f1 -d' ') | 
				
			|||
    DEV=$(echo $line | tr '\t' ' ' | tr -s ' ' | cut -f2 -d' ') | 
				
			|||
    OPTS=$(echo $line | tr '\t' ' ' | tr -s ' ' | cut -f4 -d' ') | 
				
			|||
    if /sbin/cryptsetup isLuks $DEV 2>/dev/null ; then | 
				
			|||
      echo "Locking LUKS crypt volume '${LUKS}':" | 
				
			|||
      /sbin/cryptsetup luksClose ${LUKS} | 
				
			|||
    elif echo $OPTS | grep -wq swap ; then | 
				
			|||
      # If any of the volumes was used as encrypted swap, | 
				
			|||
      # then run mkswap on the underlying device - | 
				
			|||
      # in case other Linux installations on this computer should use it: | 
				
			|||
      echo "Erasing encrypted swap '${LUKS}' and restoring normal swap on ${DEV}:" | 
				
			|||
      /sbin/cryptsetup remove ${LUKS} | 
				
			|||
      mkswap $DEV | 
				
			|||
    fi | 
				
			|||
  done | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Deactivate LVM volume groups: | 
				
			|||
if [ -r /etc/lvmtab -o -d /etc/lvm/backup ]; then | 
				
			|||
  echo "Deactivating LVM volume groups:" | 
				
			|||
  /sbin/vgchange -an --ignorelockingfailure | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# This never hurts again (especially since root-on-LVM always fails | 
				
			|||
# to deactivate the / logical volume...  but at least it was | 
				
			|||
# remounted as read-only first) | 
				
			|||
/bin/sync | 
				
			|||
 | 
				
			|||
# sleep 3 fixes problems with some hard drives that don't | 
				
			|||
# otherwise finish syncing before reboot or poweroff | 
				
			|||
/bin/sleep 3 | 
				
			|||
 | 
				
			|||
# This is to ensure all processes have completed on SMP machines: | 
				
			|||
wait | 
				
			|||
 | 
				
			|||
if [ -x /sbin/genpowerd ]; then | 
				
			|||
  # See if this is a powerfail situation: | 
				
			|||
  if /bin/egrep -q "FAIL|SCRAM" /etc/upsstatus 2> /dev/null ; then | 
				
			|||
    # Signal UPS to shut off the inverter: | 
				
			|||
    /sbin/genpowerd -k | 
				
			|||
    if [ ! $? = 0 ]; then | 
				
			|||
      echo | 
				
			|||
      echo "There was an error signaling the UPS." | 
				
			|||
      echo "Perhaps you need to edit /etc/genpowerd.conf to configure" | 
				
			|||
      echo "the serial line and UPS type." | 
				
			|||
      # Wasting 15 seconds of precious power: | 
				
			|||
      /bin/sleep 15 | 
				
			|||
    fi | 
				
			|||
  fi | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Now halt (poweroff with APM or ACPI enabled kernels) or reboot. | 
				
			|||
if [ "$shutdown_command" = "reboot" ]; then | 
				
			|||
  echo "Rebooting." | 
				
			|||
  /sbin/reboot | 
				
			|||
else | 
				
			|||
  /sbin/poweroff | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
@ -0,0 +1,299 @@ | 
				
			|||
#! /bin/sh | 
				
			|||
# | 
				
			|||
# rc.6		This file is executed by init when it goes into runlevel | 
				
			|||
#		0 (halt) or runlevel 6 (reboot). It kills all processes, | 
				
			|||
#		unmounts file systems and then either halts or reboots. | 
				
			|||
# | 
				
			|||
# Version:	@(#)/etc/rc.d/rc.6	2.47 Sat Jan 13 13:37:26 PST 2001 | 
				
			|||
# | 
				
			|||
# Author:	Miquel van Smoorenburg <miquels@drinkel.nl.mugnet.org> | 
				
			|||
# Modified by:  Patrick J. Volkerding, <volkerdi@slackware.com> | 
				
			|||
# | 
				
			|||
 | 
				
			|||
# Set the path. | 
				
			|||
PATH=/sbin:/etc:/bin:/usr/bin | 
				
			|||
 | 
				
			|||
# If there are SystemV init scripts for this runlevel, run them. | 
				
			|||
if [ -x /etc/rc.d/rc.sysvinit ]; then | 
				
			|||
  . /etc/rc.d/rc.sysvinit | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Set linefeed mode to avoid staircase effect. | 
				
			|||
/bin/stty onlcr | 
				
			|||
 | 
				
			|||
echo "Running shutdown script $0:" | 
				
			|||
 | 
				
			|||
# Find out how we were called. | 
				
			|||
case "$0" in | 
				
			|||
	*0) | 
				
			|||
		shutdown_command="halt" | 
				
			|||
		;; | 
				
			|||
	*6) | 
				
			|||
		shutdown_command=reboot | 
				
			|||
		;; | 
				
			|||
	*) | 
				
			|||
		echo "$0: call me as \"rc.0\" or \"rc.6\" please!" | 
				
			|||
		exit 1 | 
				
			|||
		;; | 
				
			|||
esac | 
				
			|||
 | 
				
			|||
# Save the system time to the hardware clock using hwclock --systohc. | 
				
			|||
# This will also create or update the timestamps in /etc/adjtime. | 
				
			|||
if [ -x /sbin/hwclock ]; then | 
				
			|||
  # Check for a broken motherboard RTC clock (where ioports for rtc are | 
				
			|||
  # unknown) to prevent hwclock causing a hang: | 
				
			|||
  if ! grep -q " : rtc" /proc/ioports ; then | 
				
			|||
    CLOCK_OPT="--directisa" | 
				
			|||
  fi | 
				
			|||
  if [ /etc/adjtime -nt /etc/hardwareclock ]; then | 
				
			|||
    if grep -q "^LOCAL" /etc/adjtime ; then | 
				
			|||
      echo "Saving system time to the hardware clock (localtime)." | 
				
			|||
    else | 
				
			|||
      echo "Saving system time to the hardware clock (UTC)." | 
				
			|||
    fi | 
				
			|||
    /sbin/hwclock $CLOCK_OPT --systohc | 
				
			|||
  elif grep -q "^UTC" /etc/hardwareclock 2> /dev/null ; then | 
				
			|||
    echo "Saving system time to the hardware clock (UTC)." | 
				
			|||
    if [ ! -r /etc/adjtime ]; then | 
				
			|||
      echo "Creating system time correction file /etc/adjtime." | 
				
			|||
    fi | 
				
			|||
    /sbin/hwclock $CLOCK_OPT --utc --systohc | 
				
			|||
  else | 
				
			|||
    echo "Saving system time to the hardware clock (localtime)." | 
				
			|||
    if [ ! -r /etc/adjtime ]; then | 
				
			|||
      echo "Creating system time correction file /etc/adjtime." | 
				
			|||
    fi | 
				
			|||
    /sbin/hwclock $CLOCK_OPT --localtime --systohc | 
				
			|||
  fi | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Run any local shutdown scripts: | 
				
			|||
if [ -x /etc/rc.d/rc.local_shutdown ]; then | 
				
			|||
  /etc/rc.d/rc.local_shutdown stop | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Stop the Apache web server: | 
				
			|||
if [ -x /etc/rc.d/rc.httpd ]; then | 
				
			|||
  /etc/rc.d/rc.httpd stop | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Stop the MySQL database: | 
				
			|||
if [ -r /var/run/mysql/mysql.pid ]; then | 
				
			|||
  . /etc/rc.d/rc.mysqld stop | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Stop the Samba server: | 
				
			|||
if [ -x /etc/rc.d/rc.samba ]; then | 
				
			|||
  . /etc/rc.d/rc.samba stop | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Shut down the NFS server: | 
				
			|||
if [ -x /etc/rc.d/rc.nfsd ]; then | 
				
			|||
  /etc/rc.d/rc.nfsd stop | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Shut down the SSH server: | 
				
			|||
if [ -x /etc/rc.d/rc.sshd ]; then | 
				
			|||
  /etc/rc.d/rc.sshd stop | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Shut down the SASL authentication daemon: | 
				
			|||
if [ -x /etc/rc.d/rc.saslauthd ]; then | 
				
			|||
  /etc/rc.d/rc.saslauthd stop | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Shut down OpenLDAP: | 
				
			|||
if [ -x /etc/rc.d/rc.openldap ]; then | 
				
			|||
  /etc/rc.d/rc.openldap stop | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Stop D-Bus: | 
				
			|||
if [ -x /etc/rc.d/rc.messagebus ]; then | 
				
			|||
  sh /etc/rc.d/rc.messagebus stop | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Kill any processes (typically gam) that would otherwise prevent | 
				
			|||
# unmounting NFS volumes: | 
				
			|||
unset FUSER_DELAY | 
				
			|||
for dir in $(/bin/mount | grep 'type nfs ' | cut -d ' ' -f 3 ) ; do | 
				
			|||
  echo "Killing processes holding NFS mount $dir open..." | 
				
			|||
  # Background this to prevent fuser from also blocking shutdown: | 
				
			|||
  /usr/bin/fuser -k -m $dir & | 
				
			|||
  FUSER_DELAY=5 | 
				
			|||
done | 
				
			|||
# If fuser was run, let it have some delay: | 
				
			|||
if [ ! -z "$FUSER_DELAY" ]; then | 
				
			|||
  sleep $FUSER_DELAY | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Unmount any NFS, SMB, or CIFS filesystems: | 
				
			|||
echo "Unmounting remote filesystems:" | 
				
			|||
/bin/umount -v -a -l -f -r -t nfs,smbfs,cifs | tr -d ' ' | grep successfully | sed "s/:successfullyunmounted/ has been successfully unmounted./g" | 
				
			|||
 | 
				
			|||
# Try to shut down pppd: | 
				
			|||
PS="$(ps ax)" | 
				
			|||
if echo "$PS" | /bin/grep -q -w pppd ; then | 
				
			|||
  if [ -x /usr/sbin/ppp-off ]; then | 
				
			|||
    /usr/sbin/ppp-off | 
				
			|||
  fi | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Shut down YP services: | 
				
			|||
if [ -x /etc/rc.d/rc.yp ]; then | 
				
			|||
  if grep -wq stop /etc/rc.d/rc.yp ; then | 
				
			|||
    /etc/rc.d/rc.yp stop | 
				
			|||
  fi | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Bring down the networking system, but first make sure that this | 
				
			|||
# isn't a diskless client with the / partition mounted via NFS: | 
				
			|||
if ! /bin/mount | /bin/grep -q 'on / type nfs' ; then | 
				
			|||
  if [ -x /etc/rc.d/rc.inet1 ]; then | 
				
			|||
    . /etc/rc.d/rc.inet1 stop | 
				
			|||
  fi | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# In case dhcpcd might have been manually started on the command line, | 
				
			|||
# look for the .pid file, and shut dhcpcd down if it's found: | 
				
			|||
if /bin/ls /etc/dhcpc/*.pid 1> /dev/null 2> /dev/null ; then | 
				
			|||
  /sbin/dhcpcd -k 1> /dev/null 2> /dev/null | 
				
			|||
  # A little time for /etc/resolv.conf and/or other files to | 
				
			|||
  # restore themselves. | 
				
			|||
  sleep 2 | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Shut down PCMCIA devices: | 
				
			|||
if [ -x /etc/rc.d/rc.pcmcia ]; then | 
				
			|||
  . /etc/rc.d/rc.pcmcia stop | 
				
			|||
  # The cards might need a little extra time here to deactivate: | 
				
			|||
  /bin/sleep 5 | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Turn off process accounting: | 
				
			|||
if [ -x /sbin/accton -a -r /var/log/pacct ]; then | 
				
			|||
  /sbin/accton off | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Terminate acpid before syslog: | 
				
			|||
if [ -x /etc/rc.d/rc.acpid -a -r /var/run/acpid.pid ]; then # quit | 
				
			|||
  . /etc/rc.d/rc.acpid stop | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Stop udev: | 
				
			|||
if [ -x /etc/rc.d/rc.udev ]; then | 
				
			|||
  sh /etc/rc.d/rc.udev force-stop | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Kill all remaining processes. | 
				
			|||
OMITPIDS="$(for p in $(pgrep mdmon); do echo -o $p; done)" # Don't kill mdmon | 
				
			|||
if [ ! "$1" = "fast" ]; then | 
				
			|||
  echo "Sending all processes the SIGTERM signal." | 
				
			|||
  /sbin/killall5 -15 $OMITPIDS | 
				
			|||
  /bin/sleep 5 | 
				
			|||
  echo "Sending all processes the SIGKILL signal." | 
				
			|||
  /sbin/killall5 -9 $OMITPIDS | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Try to turn off quota. | 
				
			|||
if /bin/grep -q quota /etc/fstab ; then | 
				
			|||
  if [ -x /sbin/quotaoff ]; then | 
				
			|||
    echo "Turning off filesystem quotas." | 
				
			|||
    /sbin/quotaoff -a | 
				
			|||
  fi | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Carry a random seed between reboots. | 
				
			|||
echo "Saving random seed from /dev/urandom in /etc/random-seed." | 
				
			|||
# Use the pool size from /proc, or 4096 bits: | 
				
			|||
if [ -r /proc/sys/kernel/random/poolsize ]; then | 
				
			|||
  /bin/dd if=/dev/urandom of=/etc/random-seed count=1 bs=$(expr $(cat /proc/sys/kernel/random/poolsize) / 8) 2> /dev/null | 
				
			|||
else | 
				
			|||
  /bin/dd if=/dev/urandom of=/etc/random-seed count=1 bs=512 2> /dev/null | 
				
			|||
fi | 
				
			|||
/bin/chmod 600 /etc/random-seed | 
				
			|||
 | 
				
			|||
# Before unmounting file systems write a reboot or halt record to wtmp. | 
				
			|||
$shutdown_command -w | 
				
			|||
 | 
				
			|||
# Turn off swap: | 
				
			|||
echo "Turning off swap." | 
				
			|||
/sbin/swapoff -a | 
				
			|||
/bin/sync | 
				
			|||
 | 
				
			|||
# Stop cgmanager and cgproxy: | 
				
			|||
if [ -x /etc/rc.d/rc.cgmanager ]; then | 
				
			|||
  sh /etc/rc.d/rc.cgmanager stop | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
echo "Unmounting local file systems:" | 
				
			|||
/bin/umount -v -a -t no,proc,sysfs | tr -d ' ' | grep successfully | sed "s/:successfullyunmounted/ has been successfully unmounted./g" 2> /dev/null | 
				
			|||
 | 
				
			|||
echo "Remounting root filesystem read-only:" | 
				
			|||
/bin/mount -v -n -o remount,ro / | 
				
			|||
 | 
				
			|||
# This never hurts: | 
				
			|||
/bin/sync | 
				
			|||
 | 
				
			|||
# Close any volumes opened by cryptsetup: | 
				
			|||
if [ -f /etc/crypttab -a -x /sbin/cryptsetup ]; then | 
				
			|||
  cat /etc/crypttab | grep -v "^#" | grep -v "^$" | while read line; do | 
				
			|||
    # NOTE: we only support LUKS formatted volumes (except for swap)! | 
				
			|||
    LUKS=$(echo $line | tr '\t' ' ' | tr -s ' ' | cut -f1 -d' ') | 
				
			|||
    DEV=$(echo $line | tr '\t' ' ' | tr -s ' ' | cut -f2 -d' ') | 
				
			|||
    OPTS=$(echo $line | tr '\t' ' ' | tr -s ' ' | cut -f4 -d' ') | 
				
			|||
    if /sbin/cryptsetup isLuks $DEV 2>/dev/null ; then | 
				
			|||
      echo "Locking LUKS crypt volume '${LUKS}':" | 
				
			|||
      /sbin/cryptsetup luksClose ${LUKS} | 
				
			|||
    elif echo $OPTS | grep -wq swap ; then | 
				
			|||
      # If any of the volumes was used as encrypted swap, | 
				
			|||
      # then run mkswap on the underlying device - | 
				
			|||
      # in case other Linux installations on this computer should use it: | 
				
			|||
      echo "Erasing encrypted swap '${LUKS}' and restoring normal swap on ${DEV}:" | 
				
			|||
      /sbin/cryptsetup remove ${LUKS} | 
				
			|||
      mkswap $DEV | 
				
			|||
    fi | 
				
			|||
  done | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Deactivate LVM volume groups: | 
				
			|||
if [ -r /etc/lvmtab -o -d /etc/lvm/backup ]; then | 
				
			|||
  echo "Deactivating LVM volume groups:" | 
				
			|||
  /sbin/vgchange -an --ignorelockingfailure | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# This never hurts again (especially since root-on-LVM always fails | 
				
			|||
# to deactivate the / logical volume...  but at least it was | 
				
			|||
# remounted as read-only first) | 
				
			|||
/bin/sync | 
				
			|||
 | 
				
			|||
# sleep 3 fixes problems with some hard drives that don't | 
				
			|||
# otherwise finish syncing before reboot or poweroff | 
				
			|||
/bin/sleep 3 | 
				
			|||
 | 
				
			|||
# This is to ensure all processes have completed on SMP machines: | 
				
			|||
wait | 
				
			|||
 | 
				
			|||
if [ -x /sbin/genpowerd ]; then | 
				
			|||
  # See if this is a powerfail situation: | 
				
			|||
  if /bin/egrep -q "FAIL|SCRAM" /etc/upsstatus 2> /dev/null ; then | 
				
			|||
    # Signal UPS to shut off the inverter: | 
				
			|||
    /sbin/genpowerd -k | 
				
			|||
    if [ ! $? = 0 ]; then | 
				
			|||
      echo | 
				
			|||
      echo "There was an error signaling the UPS." | 
				
			|||
      echo "Perhaps you need to edit /etc/genpowerd.conf to configure" | 
				
			|||
      echo "the serial line and UPS type." | 
				
			|||
      # Wasting 15 seconds of precious power: | 
				
			|||
      /bin/sleep 15 | 
				
			|||
    fi | 
				
			|||
  fi | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Now halt (poweroff with APM or ACPI enabled kernels) or reboot. | 
				
			|||
if [ "$shutdown_command" = "reboot" ]; then | 
				
			|||
  echo "Rebooting." | 
				
			|||
  /sbin/reboot | 
				
			|||
else | 
				
			|||
  /sbin/poweroff | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
@ -0,0 +1,393 @@ | 
				
			|||
#!/bin/sh | 
				
			|||
# | 
				
			|||
# rc.M		This file is executed by init(8) when the system is being | 
				
			|||
#		initialized for one of the "multi user" run levels (i.e. | 
				
			|||
#		levels 1 through 6).  It usually does mounting of file | 
				
			|||
#		systems et al. | 
				
			|||
# | 
				
			|||
# Version:	@(#)/etc/rc.d/rc.M	2.23	Wed Feb 26 19:20:58 PST 2003 | 
				
			|||
# | 
				
			|||
# Author:	Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org> | 
				
			|||
#		Heavily modified by Patrick Volkerding <volkerdi@slackware.com> | 
				
			|||
# | 
				
			|||
 | 
				
			|||
# Tell the viewers what's going to happen. | 
				
			|||
echo "Going multiuser..." | 
				
			|||
 | 
				
			|||
# Update all the shared library links: | 
				
			|||
if [ -x /sbin/ldconfig ]; then | 
				
			|||
  echo "Updating shared library links:  /sbin/ldconfig &" | 
				
			|||
  /sbin/ldconfig & | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Screen blanks after 15 minutes idle time, and powers down in one hour | 
				
			|||
# if the kernel supports APM or ACPI power management: | 
				
			|||
/bin/setterm -blank 15 -powersave powerdown -powerdown 60 | 
				
			|||
 | 
				
			|||
# Set the hostname. | 
				
			|||
if [ -r /etc/HOSTNAME ]; then | 
				
			|||
  /bin/hostname $(cat /etc/HOSTNAME | cut -f1 -d .) | 
				
			|||
else | 
				
			|||
  # fall back on this old default: | 
				
			|||
  echo "darkstar.example.net" > /etc/HOSTNAME | 
				
			|||
  /bin/hostname darkstar | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Set the permissions on /var/log/dmesg according to whether the kernel | 
				
			|||
# permits non-root users to access kernel dmesg information: | 
				
			|||
if [ -r /proc/sys/kernel/dmesg_restrict ]; then | 
				
			|||
  if [ $(cat /proc/sys/kernel/dmesg_restrict) = 1 ]; then | 
				
			|||
    touch /var/log/dmesg | 
				
			|||
    chmod 640 /var/log/dmesg | 
				
			|||
  fi | 
				
			|||
else | 
				
			|||
  touch /var/log/dmesg | 
				
			|||
  chmod 644 /var/log/dmesg | 
				
			|||
fi | 
				
			|||
# Save the contents of 'dmesg': | 
				
			|||
/bin/dmesg -s 65536 > /var/log/dmesg | 
				
			|||
 | 
				
			|||
# Initialize PCMCIA devices: | 
				
			|||
# | 
				
			|||
# NOTE: This used to be started near the top of rc.S so that PCMCIA devices | 
				
			|||
# could be fsck'ed along with the other drives.  This had some unfortunate | 
				
			|||
# side effects, however, since root isn't yet read-write, and /var might not | 
				
			|||
# even be mounted the .pid files can't be correctly written in /var/run and | 
				
			|||
# the pcmcia system can't be correctly shut down.  If you want some PCMCIA | 
				
			|||
# partition to be mounted at boot (or when the card is inserted) then add | 
				
			|||
# the appropriate lines to /etc/pcmcia/scsi.opts. | 
				
			|||
# | 
				
			|||
# Note that the stuff in /etc/pcmcia/ is only for 2.4.x kernels using | 
				
			|||
# 16-bit PCMCIA cards (not 32-bit Cardbus cards!).  For example, with a | 
				
			|||
# wireless card you might need to set options in /etc/pcmcia OR in | 
				
			|||
# /etc/rc.d/rc.wireless.conf, or even in /etc/rc.d/rc.inet1.conf (with | 
				
			|||
# extra options if needed for the encryption key, ESSID, etc.) | 
				
			|||
# | 
				
			|||
# Hopefully this situation will be unified in the future, but for now | 
				
			|||
# that's how it is... | 
				
			|||
# | 
				
			|||
if [ -x /etc/rc.d/rc.pcmcia ]; then | 
				
			|||
  . /etc/rc.d/rc.pcmcia start | 
				
			|||
  # The cards might need a little extra time here to initialize. | 
				
			|||
  sleep 5 | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Start the system logger. | 
				
			|||
if [ -x /etc/rc.d/rc.syslog -a -x /usr/sbin/syslogd -a -d /var/log ]; then | 
				
			|||
  . /etc/rc.d/rc.syslog start | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Update the X font indexes: | 
				
			|||
if [ -x /usr/bin/fc-cache ]; then | 
				
			|||
  echo "Updating X font indexes:  /usr/bin/fc-cache -f &" | 
				
			|||
  /usr/bin/fc-cache -f & | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Run rc.udev again.  This will start udev if it is not already running | 
				
			|||
# (for example, upon return from runlevel 1), otherwise it will trigger it | 
				
			|||
# to look for device changes and to generate persistent rules if needed. | 
				
			|||
if grep -wq sysfs /proc/mounts && grep -q devtmpfs /proc/filesystems ; then | 
				
			|||
  if ! grep -wq nohotplug /proc/cmdline ; then | 
				
			|||
    if [ -x /etc/rc.d/rc.udev ]; then | 
				
			|||
      /bin/sh /etc/rc.d/rc.udev start | 
				
			|||
    fi | 
				
			|||
  fi | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Initialize the networking hardware. | 
				
			|||
if [ -x /etc/rc.d/rc.inet1 ]; then | 
				
			|||
  . /etc/rc.d/rc.inet1 | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Start D-Bus: | 
				
			|||
if [ -x /etc/rc.d/rc.messagebus ]; then | 
				
			|||
  sh /etc/rc.d/rc.messagebus start | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Start Bluetooth: | 
				
			|||
if [ -x /etc/rc.d/rc.bluetooth ]; then | 
				
			|||
  sh /etc/rc.d/rc.bluetooth start | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Start wicd or networkmanager: | 
				
			|||
if [ -x /etc/rc.d/rc.wicd -a -x /usr/sbin/wicd ]; then | 
				
			|||
  sh /etc/rc.d/rc.wicd start | 
				
			|||
elif [ -x /etc/rc.d/rc.networkmanager ]; then | 
				
			|||
  sh /etc/rc.d/rc.networkmanager start | 
				
			|||
elif [ -x /etc/rc.d/rc.dhcpcd ]; then | 
				
			|||
  sh /etc/rc.d/rc.dhcpcd start | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Start networking daemons: | 
				
			|||
if [ -x /etc/rc.d/rc.inet2 ]; then | 
				
			|||
  . /etc/rc.d/rc.inet2 | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Look for additional USB/SCSI/IEEE1394/etc devices on multiple LUNs: | 
				
			|||
if [ -x /etc/rc.d/rc.scanluns ]; then | 
				
			|||
  . /etc/rc.d/rc.scanluns | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Mount any additional filesystem types that haven't already been mounted: | 
				
			|||
mount -a -v 2> /dev/null | grep -v -e "already mounted" -e "ignored" | cut -f 1 -d : | tr -d ' ' | while read dev ; do mount | grep "${dev} " ; done | 
				
			|||
 | 
				
			|||
# Start the Control Script for automounter: | 
				
			|||
if [ -x /etc/rc.d/rc.autofs ]; then | 
				
			|||
  sh /etc/rc.d/rc.autofs start | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Start the Network Time Protocol daemon: | 
				
			|||
if [ -x /etc/rc.d/rc.ntpd ]; then | 
				
			|||
  sh /etc/rc.d/rc.ntpd start | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Remove stale locks and junk files (must be done after mount -a!) | 
				
			|||
/bin/rm -f /var/lock/* /var/spool/uucp/LCK..* /tmp/.X*lock /tmp/core /core 2> /dev/null | 
				
			|||
/bin/rm -rf /var/spool/cron/cron.?????? 2> /dev/null | 
				
			|||
 | 
				
			|||
# Remove stale hunt sockets so the game can start. | 
				
			|||
if [ -r /tmp/hunt -o -r /tmp/hunt.stats ]; then | 
				
			|||
  echo "Removing your stale hunt sockets from /tmp." | 
				
			|||
  /bin/rm -f /tmp/hunt* | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Ensure basic filesystem permissions sanity. | 
				
			|||
chmod 755 / 2> /dev/null | 
				
			|||
chmod 1777 /tmp /var/tmp | 
				
			|||
 | 
				
			|||
# Start ACPI daemon. | 
				
			|||
if [ -x /etc/rc.d/rc.acpid ]; then | 
				
			|||
  . /etc/rc.d/rc.acpid start | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Enable CPU frequency scaling: | 
				
			|||
if [ -x /etc/rc.d/rc.cpufreq ]; then | 
				
			|||
  . /etc/rc.d/rc.cpufreq start | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Update any existing icon cache files: | 
				
			|||
if find /usr/share/icons -maxdepth 2 2> /dev/null | grep -q icon-theme.cache ; then | 
				
			|||
  for theme_dir in /usr/share/icons/* ; do | 
				
			|||
    if [ -r ${theme_dir}/icon-theme.cache ]; then | 
				
			|||
      echo "Updating icon-theme.cache in ${theme_dir}..." | 
				
			|||
      /usr/bin/gtk-update-icon-cache -t -f ${theme_dir} 1> /dev/null 2> /dev/null & | 
				
			|||
    fi | 
				
			|||
  done | 
				
			|||
  # This would be a large file and probably shouldn't be there. | 
				
			|||
  if [ -r /usr/share/icons/icon-theme.cache ]; then | 
				
			|||
    echo "Deleting icon-theme.cache in /usr/share/icons..." | 
				
			|||
    #/usr/bin/gtk-update-icon-cache -t -f /usr/share/icons 1> /dev/null 2> /dev/null & | 
				
			|||
    rm -f /usr/share/icons/icon-theme.cache | 
				
			|||
  fi | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Update mime database: | 
				
			|||
if [ -x /usr/bin/update-mime-database -a -d /usr/share/mime ]; then | 
				
			|||
  echo "Updating MIME database:  /usr/bin/update-mime-database /usr/share/mime &" | 
				
			|||
  /usr/bin/update-mime-database /usr/share/mime 1> /dev/null 2> /dev/null & | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Start console-kit-daemon: | 
				
			|||
if [ -x /etc/rc.d/rc.consolekit ]; then | 
				
			|||
  sh /etc/rc.d/rc.consolekit start | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Start HAL: | 
				
			|||
if [ -x /etc/rc.d/rc.hald ]; then | 
				
			|||
  sh /etc/rc.d/rc.hald start | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Start system-wide PulseAudio daemon (not recommended, nor required in | 
				
			|||
# order to use PulseAudio -- see the script for details): | 
				
			|||
if [ -x /etc/rc.d/rc.pulseaudio ]; then | 
				
			|||
  . /etc/rc.d/rc.pulseaudio start | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# These GTK+/pango files need to be kept up to date for | 
				
			|||
# proper input method, pixbuf loaders, and font support. | 
				
			|||
if [ -x /usr/bin/update-gtk-immodules ]; then | 
				
			|||
  echo "Updating gtk.immodules:" | 
				
			|||
  echo "  /usr/bin/update-gtk-immodules &" | 
				
			|||
  /usr/bin/update-gtk-immodules > /dev/null 2>&1 & | 
				
			|||
fi | 
				
			|||
if [ -x /usr/bin/update-gdk-pixbuf-loaders ]; then | 
				
			|||
  echo "Updating gdk-pixbuf.loaders:" | 
				
			|||
  echo "  /usr/bin/update-gdk-pixbuf-loaders &" | 
				
			|||
  /usr/bin/update-gdk-pixbuf-loaders > /dev/null 2>&1 & | 
				
			|||
fi | 
				
			|||
if [ -x /usr/bin/update-pango-querymodules ]; then | 
				
			|||
  echo "Updating pango.modules:" | 
				
			|||
  echo "  /usr/bin/update-pango-querymodules &" | 
				
			|||
  /usr/bin/update-pango-querymodules > /dev/null 2>&1 & | 
				
			|||
fi | 
				
			|||
if [ -x /usr/bin/glib-compile-schemas ]; then | 
				
			|||
  echo "Compiling GSettings XML schema files:" | 
				
			|||
  echo "  /usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas &" | 
				
			|||
  /usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas >/dev/null 2>&1 & | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Start dnsmasq, a simple DHCP/DNS server: | 
				
			|||
if [ -x /etc/rc.d/rc.dnsmasq ]; then | 
				
			|||
  /etc/rc.d/rc.dnsmasq start | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Start snmpd: | 
				
			|||
if [ -x /etc/rc.d/rc.snmpd ]; then | 
				
			|||
  /etc/rc.d/rc.snmpd start | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Start the print spooling system.  This will usually be LPRng (lpd) or CUPS. | 
				
			|||
if [ -x /etc/rc.d/rc.cups ]; then | 
				
			|||
  # Start CUPS: | 
				
			|||
  /etc/rc.d/rc.cups start | 
				
			|||
elif [ -x /etc/rc.d/rc.lprng ]; then | 
				
			|||
  # Start LPRng (lpd): | 
				
			|||
  . /etc/rc.d/rc.lprng start | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Start netatalk. (a file/print server for Macs using Appletalk) | 
				
			|||
if [ -x /etc/rc.d/rc.atalk ]; then | 
				
			|||
  /etc/rc.d/rc.atalk start | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Start smartd, which monitors the status of S.M.A.R.T. compatible | 
				
			|||
# hard drives and reports any problems.  Note some devices (which aren't | 
				
			|||
# smart, I guess ;) will hang if probed by smartd, so it's commented out | 
				
			|||
# by default. | 
				
			|||
#if [ -x /usr/sbin/smartd ]; then | 
				
			|||
#  /usr/sbin/smartd | 
				
			|||
#fi | 
				
			|||
 | 
				
			|||
# Monitor the UPS with genpowerd. | 
				
			|||
# To use this, uncomment this section and edit your settings in | 
				
			|||
# /etc/genpowerd.conf (serial device, UPS type, etc).  For more information, | 
				
			|||
# see "man genpowerd" or the extensive documentation in the | 
				
			|||
# /usr/doc/genpower-*/ directory. | 
				
			|||
# You'll also need to configure a similar block in /etc/rc.d/rc.6 if you want | 
				
			|||
# support for stopping the UPS's inverter after the machine halts. | 
				
			|||
#if [ -x /sbin/genpowerd ]; then | 
				
			|||
#  echo "Starting genpowerd daemon..." | 
				
			|||
#  /sbin/genpowerd | 
				
			|||
#fi | 
				
			|||
 | 
				
			|||
# Turn on process accounting.  To enable process accounting, make sure the | 
				
			|||
# option for BSD process accounting is enabled in your kernel, and then | 
				
			|||
# create the file /var/log/pacct (touch /var/log/pacct).  By default, process | 
				
			|||
# accounting is not enabled (since /var/log/pacct does not exist).  This is | 
				
			|||
# because the log file can get VERY large. | 
				
			|||
if [ -x /sbin/accton -a -r /var/log/pacct ]; then | 
				
			|||
  chmod 640 /var/log/pacct | 
				
			|||
  /sbin/accton /var/log/pacct | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Start crond (Dillon's crond): | 
				
			|||
# If you want cron to actually log activity to /var/log/cron, then change | 
				
			|||
# -l notice to -l info to increase the logging level. | 
				
			|||
if [ -x /usr/sbin/crond ]; then | 
				
			|||
  /usr/sbin/crond -l notice | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Start atd (manages jobs scheduled with 'at'): | 
				
			|||
if [ -x /usr/sbin/atd ]; then | 
				
			|||
  /usr/sbin/atd -b 15 -l 1 | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Slackware-Mini-Quota-HOWTO: | 
				
			|||
# To really activate quotas, you'll need to add 'usrquota' and/or 'grpquota' to | 
				
			|||
# the appropriate partitions as listed in /etc/fstab.  Here's an example: | 
				
			|||
# | 
				
			|||
# /dev/hda2      /home      ext3     defaults,usrquota      1   1 | 
				
			|||
# | 
				
			|||
# You'll then need to setup initial quota files at the top of the partitions | 
				
			|||
# to support quota, like this: | 
				
			|||
# touch /home/aquota.user /home/aquota.group | 
				
			|||
# chmod 600 /home/aquota.user /home/aquota.group | 
				
			|||
# | 
				
			|||
# Then, reboot to activate the system. | 
				
			|||
# To edit user quotas, use 'edquota'.  See 'man edquota'.  Also, the | 
				
			|||
# official Quota Mini-HOWTO has lots of useful information.  That can be found | 
				
			|||
# here:  /usr/doc/Linux-HOWTOs/Quota | 
				
			|||
 | 
				
			|||
# Check quotas and then turn quota system on: | 
				
			|||
if grep -q quota /etc/fstab ; then | 
				
			|||
  for quotafs in $(awk '/quota/ {print $2}' /etc/fstab) ; do | 
				
			|||
    /bin/rm -f $quotafs/{a,}quota.{group,user}.new | 
				
			|||
  done | 
				
			|||
  if [ -x /sbin/quotacheck ]; then | 
				
			|||
    echo "Checking filesystem quotas:  /sbin/quotacheck -avugm" | 
				
			|||
    /sbin/quotacheck -avugm | 
				
			|||
  fi | 
				
			|||
  if [ -x /sbin/quotaon ]; then | 
				
			|||
    echo "Activating filesystem quotas:  /sbin/quotaon -avug" | 
				
			|||
    /sbin/quotaon -avug | 
				
			|||
  fi | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Start the SASL authentication server.  This provides SASL | 
				
			|||
# authentication services for sendmail: | 
				
			|||
if [ -x /etc/rc.d/rc.saslauthd ]; then | 
				
			|||
  . /etc/rc.d/rc.saslauthd start | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Start the sendmail daemon: | 
				
			|||
if [ -x /etc/rc.d/rc.sendmail ]; then | 
				
			|||
  . /etc/rc.d/rc.sendmail start | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Load ALSA (sound) defaults: | 
				
			|||
if [ -x /etc/rc.d/rc.alsa ]; then | 
				
			|||
  . /etc/rc.d/rc.alsa | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Load a custom screen font if the user has an rc.font script. | 
				
			|||
if [ -x /etc/rc.d/rc.font ]; then | 
				
			|||
  . /etc/rc.d/rc.font | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Load a custom keymap if the user has an rc.keymap script. | 
				
			|||
if [ -x /etc/rc.d/rc.keymap ]; then | 
				
			|||
  . /etc/rc.d/rc.keymap | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Start the MySQL database: | 
				
			|||
if [ -x /etc/rc.d/rc.mysqld ]; then | 
				
			|||
  . /etc/rc.d/rc.mysqld start | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Start Apache web server: | 
				
			|||
if [ -x /etc/rc.d/rc.httpd ]; then | 
				
			|||
  . /etc/rc.d/rc.httpd start | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Start OpenLDAP: | 
				
			|||
if [ -x /etc/rc.d/rc.openldap ]; then | 
				
			|||
  . /etc/rc.d/rc.openldap start | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Start Samba (a file/print server for Win95/NT machines). | 
				
			|||
# Samba can be started in /etc/inetd.conf instead. | 
				
			|||
if [ -x /etc/rc.d/rc.samba ]; then | 
				
			|||
  . /etc/rc.d/rc.samba start | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Start the GPM mouse server: | 
				
			|||
if [ -x /etc/rc.d/rc.gpm ]; then | 
				
			|||
  . /etc/rc.d/rc.gpm start | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# If there are SystemV init scripts for this runlevel, run them. | 
				
			|||
if [ -x /etc/rc.d/rc.sysvinit ]; then | 
				
			|||
  . /etc/rc.d/rc.sysvinit | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Start Profile-sync-daemon: | 
				
			|||
if [ -x /etc/rc.d/rc.psd ]; then | 
				
			|||
  /etc/rc.d/rc.psd start | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Start the local setup procedure. | 
				
			|||
if [ -x /etc/rc.d/rc.local ]; then | 
				
			|||
  . /etc/rc.d/rc.local | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# All done. | 
				
			|||
@ -0,0 +1,386 @@ | 
				
			|||
#!/bin/sh | 
				
			|||
# | 
				
			|||
# rc.M		This file is executed by init(8) when the system is being | 
				
			|||
#		initialized for one of the "multi user" run levels (i.e. | 
				
			|||
#		levels 1 through 6).  It usually does mounting of file | 
				
			|||
#		systems et al. | 
				
			|||
# | 
				
			|||
# Version:	@(#)/etc/rc.d/rc.M	2.23	Wed Feb 26 19:20:58 PST 2003 | 
				
			|||
# | 
				
			|||
# Author:	Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org> | 
				
			|||
#		Heavily modified by Patrick Volkerding <volkerdi@slackware.com> | 
				
			|||
# | 
				
			|||
 | 
				
			|||
# Tell the viewers what's going to happen. | 
				
			|||
echo "Going multiuser..." | 
				
			|||
 | 
				
			|||
# Update all the shared library links: | 
				
			|||
if [ -x /sbin/ldconfig ]; then | 
				
			|||
  echo "Updating shared library links:  /sbin/ldconfig &" | 
				
			|||
  /sbin/ldconfig & | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Screen blanks after 15 minutes idle time, and powers down in one hour | 
				
			|||
# if the kernel supports APM or ACPI power management: | 
				
			|||
/bin/setterm -blank 15 -powersave powerdown -powerdown 60 | 
				
			|||
 | 
				
			|||
# Set the hostname. | 
				
			|||
if [ -r /etc/HOSTNAME ]; then | 
				
			|||
  /bin/hostname $(cat /etc/HOSTNAME | cut -f1 -d .) | 
				
			|||
else | 
				
			|||
  # fall back on this old default: | 
				
			|||
  echo "darkstar.example.net" > /etc/HOSTNAME | 
				
			|||
  /bin/hostname darkstar | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Set the permissions on /var/log/dmesg according to whether the kernel | 
				
			|||
# permits non-root users to access kernel dmesg information: | 
				
			|||
if [ -r /proc/sys/kernel/dmesg_restrict ]; then | 
				
			|||
  if [ $(cat /proc/sys/kernel/dmesg_restrict) = 1 ]; then | 
				
			|||
    touch /var/log/dmesg | 
				
			|||
    chmod 640 /var/log/dmesg | 
				
			|||
  fi | 
				
			|||
else | 
				
			|||
  touch /var/log/dmesg | 
				
			|||
  chmod 644 /var/log/dmesg | 
				
			|||
fi | 
				
			|||
# Save the contents of 'dmesg': | 
				
			|||
/bin/dmesg -s 65536 > /var/log/dmesg | 
				
			|||
 | 
				
			|||
# Initialize PCMCIA devices: | 
				
			|||
# | 
				
			|||
# NOTE: This used to be started near the top of rc.S so that PCMCIA devices | 
				
			|||
# could be fsck'ed along with the other drives.  This had some unfortunate | 
				
			|||
# side effects, however, since root isn't yet read-write, and /var might not | 
				
			|||
# even be mounted the .pid files can't be correctly written in /var/run and | 
				
			|||
# the pcmcia system can't be correctly shut down.  If you want some PCMCIA | 
				
			|||
# partition to be mounted at boot (or when the card is inserted) then add | 
				
			|||
# the appropriate lines to /etc/pcmcia/scsi.opts. | 
				
			|||
# | 
				
			|||
# Note that the stuff in /etc/pcmcia/ is only for 2.4.x kernels using | 
				
			|||
# 16-bit PCMCIA cards (not 32-bit Cardbus cards!).  For example, with a | 
				
			|||
# wireless card you might need to set options in /etc/pcmcia OR in | 
				
			|||
# /etc/rc.d/rc.wireless.conf, or even in /etc/rc.d/rc.inet1.conf (with | 
				
			|||
# extra options if needed for the encryption key, ESSID, etc.) | 
				
			|||
# | 
				
			|||
# Hopefully this situation will be unified in the future, but for now | 
				
			|||
# that's how it is... | 
				
			|||
# | 
				
			|||
if [ -x /etc/rc.d/rc.pcmcia ]; then | 
				
			|||
  . /etc/rc.d/rc.pcmcia start | 
				
			|||
  # The cards might need a little extra time here to initialize. | 
				
			|||
  sleep 5 | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Start the system logger. | 
				
			|||
if [ -x /etc/rc.d/rc.syslog -a -x /usr/sbin/syslogd -a -d /var/log ]; then | 
				
			|||
  . /etc/rc.d/rc.syslog start | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Update the X font indexes: | 
				
			|||
if [ -x /usr/bin/fc-cache ]; then | 
				
			|||
  echo "Updating X font indexes:  /usr/bin/fc-cache -f &" | 
				
			|||
  /usr/bin/fc-cache -f & | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Run rc.udev again.  This will start udev if it is not already running | 
				
			|||
# (for example, upon return from runlevel 1), otherwise it will trigger it | 
				
			|||
# to look for device changes and to generate persistent rules if needed. | 
				
			|||
if grep -wq sysfs /proc/mounts && grep -q devtmpfs /proc/filesystems ; then | 
				
			|||
  if ! grep -wq nohotplug /proc/cmdline ; then | 
				
			|||
    if [ -x /etc/rc.d/rc.udev ]; then | 
				
			|||
      /bin/sh /etc/rc.d/rc.udev start | 
				
			|||
    fi | 
				
			|||
  fi | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Initialize the networking hardware. | 
				
			|||
if [ -x /etc/rc.d/rc.inet1 ]; then | 
				
			|||
  . /etc/rc.d/rc.inet1 | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Start D-Bus: | 
				
			|||
if [ -x /etc/rc.d/rc.messagebus ]; then | 
				
			|||
  sh /etc/rc.d/rc.messagebus start | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Start Bluetooth: | 
				
			|||
if [ -x /etc/rc.d/rc.bluetooth ]; then | 
				
			|||
  sh /etc/rc.d/rc.bluetooth start | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Start wicd or networkmanager: | 
				
			|||
if [ -x /etc/rc.d/rc.wicd -a -x /usr/sbin/wicd ]; then | 
				
			|||
  sh /etc/rc.d/rc.wicd start | 
				
			|||
elif [ -x /etc/rc.d/rc.networkmanager ]; then | 
				
			|||
  sh /etc/rc.d/rc.networkmanager start | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Start networking daemons: | 
				
			|||
if [ -x /etc/rc.d/rc.inet2 ]; then | 
				
			|||
  . /etc/rc.d/rc.inet2 | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Look for additional USB/SCSI/IEEE1394/etc devices on multiple LUNs: | 
				
			|||
if [ -x /etc/rc.d/rc.scanluns ]; then | 
				
			|||
  . /etc/rc.d/rc.scanluns | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Mount any additional filesystem types that haven't already been mounted: | 
				
			|||
mount -a -v 2> /dev/null | grep -v -e "already mounted" -e "ignored" | cut -f 1 -d : | tr -d ' ' | while read dev ; do mount | grep "${dev} " ; done | 
				
			|||
 | 
				
			|||
# Start the Control Script for automounter: | 
				
			|||
if [ -x /etc/rc.d/rc.autofs ]; then | 
				
			|||
  sh /etc/rc.d/rc.autofs start | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Start the Network Time Protocol daemon: | 
				
			|||
if [ -x /etc/rc.d/rc.ntpd ]; then | 
				
			|||
  sh /etc/rc.d/rc.ntpd start | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Remove stale locks and junk files (must be done after mount -a!) | 
				
			|||
/bin/rm -f /var/lock/* /var/spool/uucp/LCK..* /tmp/.X*lock /tmp/core /core 2> /dev/null | 
				
			|||
/bin/rm -rf /var/spool/cron/cron.?????? 2> /dev/null | 
				
			|||
 | 
				
			|||
# Remove stale hunt sockets so the game can start. | 
				
			|||
if [ -r /tmp/hunt -o -r /tmp/hunt.stats ]; then | 
				
			|||
  echo "Removing your stale hunt sockets from /tmp." | 
				
			|||
  /bin/rm -f /tmp/hunt* | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Ensure basic filesystem permissions sanity. | 
				
			|||
chmod 755 / 2> /dev/null | 
				
			|||
chmod 1777 /tmp /var/tmp | 
				
			|||
 | 
				
			|||
# Start ACPI daemon. | 
				
			|||
if [ -x /etc/rc.d/rc.acpid ]; then | 
				
			|||
  . /etc/rc.d/rc.acpid start | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Enable CPU frequency scaling: | 
				
			|||
if [ -x /etc/rc.d/rc.cpufreq ]; then | 
				
			|||
  . /etc/rc.d/rc.cpufreq start | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Update any existing icon cache files: | 
				
			|||
if find /usr/share/icons -maxdepth 2 2> /dev/null | grep -q icon-theme.cache ; then | 
				
			|||
  for theme_dir in /usr/share/icons/* ; do | 
				
			|||
    if [ -r ${theme_dir}/icon-theme.cache ]; then | 
				
			|||
      echo "Updating icon-theme.cache in ${theme_dir}..." | 
				
			|||
      /usr/bin/gtk-update-icon-cache -t -f ${theme_dir} 1> /dev/null 2> /dev/null & | 
				
			|||
    fi | 
				
			|||
  done | 
				
			|||
  # This would be a large file and probably shouldn't be there. | 
				
			|||
  if [ -r /usr/share/icons/icon-theme.cache ]; then | 
				
			|||
    echo "Deleting icon-theme.cache in /usr/share/icons..." | 
				
			|||
    #/usr/bin/gtk-update-icon-cache -t -f /usr/share/icons 1> /dev/null 2> /dev/null & | 
				
			|||
    rm -f /usr/share/icons/icon-theme.cache | 
				
			|||
  fi | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Update mime database: | 
				
			|||
if [ -x /usr/bin/update-mime-database -a -d /usr/share/mime ]; then | 
				
			|||
  echo "Updating MIME database:  /usr/bin/update-mime-database /usr/share/mime &" | 
				
			|||
  /usr/bin/update-mime-database /usr/share/mime 1> /dev/null 2> /dev/null & | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Start console-kit-daemon: | 
				
			|||
if [ -x /etc/rc.d/rc.consolekit ]; then | 
				
			|||
  sh /etc/rc.d/rc.consolekit start | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Start HAL: | 
				
			|||
if [ -x /etc/rc.d/rc.hald ]; then | 
				
			|||
  sh /etc/rc.d/rc.hald start | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Start system-wide PulseAudio daemon (not recommended, nor required in | 
				
			|||
# order to use PulseAudio -- see the script for details): | 
				
			|||
if [ -x /etc/rc.d/rc.pulseaudio ]; then | 
				
			|||
  . /etc/rc.d/rc.pulseaudio start | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# These GTK+/pango files need to be kept up to date for | 
				
			|||
# proper input method, pixbuf loaders, and font support. | 
				
			|||
if [ -x /usr/bin/update-gtk-immodules ]; then | 
				
			|||
  echo "Updating gtk.immodules:" | 
				
			|||
  echo "  /usr/bin/update-gtk-immodules &" | 
				
			|||
  /usr/bin/update-gtk-immodules > /dev/null 2>&1 & | 
				
			|||
fi | 
				
			|||
if [ -x /usr/bin/update-gdk-pixbuf-loaders ]; then | 
				
			|||
  echo "Updating gdk-pixbuf.loaders:" | 
				
			|||
  echo "  /usr/bin/update-gdk-pixbuf-loaders &" | 
				
			|||
  /usr/bin/update-gdk-pixbuf-loaders > /dev/null 2>&1 & | 
				
			|||
fi | 
				
			|||
if [ -x /usr/bin/update-pango-querymodules ]; then | 
				
			|||
  echo "Updating pango.modules:" | 
				
			|||
  echo "  /usr/bin/update-pango-querymodules &" | 
				
			|||
  /usr/bin/update-pango-querymodules > /dev/null 2>&1 & | 
				
			|||
fi | 
				
			|||
if [ -x /usr/bin/glib-compile-schemas ]; then | 
				
			|||
  echo "Compiling GSettings XML schema files:" | 
				
			|||
  echo "  /usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas &" | 
				
			|||
  /usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas >/dev/null 2>&1 & | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Start dnsmasq, a simple DHCP/DNS server: | 
				
			|||
if [ -x /etc/rc.d/rc.dnsmasq ]; then | 
				
			|||
  /etc/rc.d/rc.dnsmasq start | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Start snmpd: | 
				
			|||
if [ -x /etc/rc.d/rc.snmpd ]; then | 
				
			|||
  /etc/rc.d/rc.snmpd start | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Start the print spooling system.  This will usually be LPRng (lpd) or CUPS. | 
				
			|||
if [ -x /etc/rc.d/rc.cups ]; then | 
				
			|||
  # Start CUPS: | 
				
			|||
  /etc/rc.d/rc.cups start | 
				
			|||
elif [ -x /etc/rc.d/rc.lprng ]; then | 
				
			|||
  # Start LPRng (lpd): | 
				
			|||
  . /etc/rc.d/rc.lprng start | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Start netatalk. (a file/print server for Macs using Appletalk) | 
				
			|||
if [ -x /etc/rc.d/rc.atalk ]; then | 
				
			|||
  /etc/rc.d/rc.atalk start | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Start smartd, which monitors the status of S.M.A.R.T. compatible | 
				
			|||
# hard drives and reports any problems.  Note some devices (which aren't | 
				
			|||
# smart, I guess ;) will hang if probed by smartd, so it's commented out | 
				
			|||
# by default. | 
				
			|||
#if [ -x /usr/sbin/smartd ]; then | 
				
			|||
#  /usr/sbin/smartd | 
				
			|||
#fi | 
				
			|||
 | 
				
			|||
# Monitor the UPS with genpowerd. | 
				
			|||
# To use this, uncomment this section and edit your settings in | 
				
			|||
# /etc/genpowerd.conf (serial device, UPS type, etc).  For more information, | 
				
			|||
# see "man genpowerd" or the extensive documentation in the | 
				
			|||
# /usr/doc/genpower-*/ directory. | 
				
			|||
# You'll also need to configure a similar block in /etc/rc.d/rc.6 if you want | 
				
			|||
# support for stopping the UPS's inverter after the machine halts. | 
				
			|||
#if [ -x /sbin/genpowerd ]; then | 
				
			|||
#  echo "Starting genpowerd daemon..." | 
				
			|||
#  /sbin/genpowerd | 
				
			|||
#fi | 
				
			|||
 | 
				
			|||
# Turn on process accounting.  To enable process accounting, make sure the | 
				
			|||
# option for BSD process accounting is enabled in your kernel, and then | 
				
			|||
# create the file /var/log/pacct (touch /var/log/pacct).  By default, process | 
				
			|||
# accounting is not enabled (since /var/log/pacct does not exist).  This is | 
				
			|||
# because the log file can get VERY large. | 
				
			|||
if [ -x /sbin/accton -a -r /var/log/pacct ]; then | 
				
			|||
  chmod 640 /var/log/pacct | 
				
			|||
  /sbin/accton /var/log/pacct | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Start crond (Dillon's crond): | 
				
			|||
# If you want cron to actually log activity to /var/log/cron, then change | 
				
			|||
# -l notice to -l info to increase the logging level. | 
				
			|||
if [ -x /usr/sbin/crond ]; then | 
				
			|||
  /usr/sbin/crond -l notice | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Start atd (manages jobs scheduled with 'at'): | 
				
			|||
if [ -x /usr/sbin/atd ]; then | 
				
			|||
  /usr/sbin/atd -b 15 -l 1 | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Slackware-Mini-Quota-HOWTO: | 
				
			|||
# To really activate quotas, you'll need to add 'usrquota' and/or 'grpquota' to | 
				
			|||
# the appropriate partitions as listed in /etc/fstab.  Here's an example: | 
				
			|||
# | 
				
			|||
# /dev/hda2      /home      ext3     defaults,usrquota      1   1 | 
				
			|||
# | 
				
			|||
# You'll then need to setup initial quota files at the top of the partitions | 
				
			|||
# to support quota, like this: | 
				
			|||
# touch /home/aquota.user /home/aquota.group | 
				
			|||
# chmod 600 /home/aquota.user /home/aquota.group | 
				
			|||
# | 
				
			|||
# Then, reboot to activate the system. | 
				
			|||
# To edit user quotas, use 'edquota'.  See 'man edquota'.  Also, the | 
				
			|||
# official Quota Mini-HOWTO has lots of useful information.  That can be found | 
				
			|||
# here:  /usr/doc/Linux-HOWTOs/Quota | 
				
			|||
 | 
				
			|||
# Check quotas and then turn quota system on: | 
				
			|||
if grep -q quota /etc/fstab ; then | 
				
			|||
  for quotafs in $(awk '/quota/ {print $2}' /etc/fstab) ; do | 
				
			|||
    /bin/rm -f $quotafs/{a,}quota.{group,user}.new | 
				
			|||
  done | 
				
			|||
  if [ -x /sbin/quotacheck ]; then | 
				
			|||
    echo "Checking filesystem quotas:  /sbin/quotacheck -avugm" | 
				
			|||
    /sbin/quotacheck -avugm | 
				
			|||
  fi | 
				
			|||
  if [ -x /sbin/quotaon ]; then | 
				
			|||
    echo "Activating filesystem quotas:  /sbin/quotaon -avug" | 
				
			|||
    /sbin/quotaon -avug | 
				
			|||
  fi | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Start the SASL authentication server.  This provides SASL | 
				
			|||
# authentication services for sendmail: | 
				
			|||
if [ -x /etc/rc.d/rc.saslauthd ]; then | 
				
			|||
  . /etc/rc.d/rc.saslauthd start | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Start the sendmail daemon: | 
				
			|||
if [ -x /etc/rc.d/rc.sendmail ]; then | 
				
			|||
  . /etc/rc.d/rc.sendmail start | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Load ALSA (sound) defaults: | 
				
			|||
if [ -x /etc/rc.d/rc.alsa ]; then | 
				
			|||
  . /etc/rc.d/rc.alsa | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Load a custom screen font if the user has an rc.font script. | 
				
			|||
if [ -x /etc/rc.d/rc.font ]; then | 
				
			|||
  . /etc/rc.d/rc.font | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Load a custom keymap if the user has an rc.keymap script. | 
				
			|||
if [ -x /etc/rc.d/rc.keymap ]; then | 
				
			|||
  . /etc/rc.d/rc.keymap | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Start the MySQL database: | 
				
			|||
if [ -x /etc/rc.d/rc.mysqld ]; then | 
				
			|||
  . /etc/rc.d/rc.mysqld start | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Start Apache web server: | 
				
			|||
if [ -x /etc/rc.d/rc.httpd ]; then | 
				
			|||
  . /etc/rc.d/rc.httpd start | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Start OpenLDAP: | 
				
			|||
if [ -x /etc/rc.d/rc.openldap ]; then | 
				
			|||
  . /etc/rc.d/rc.openldap start | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Start Samba (a file/print server for Win95/NT machines). | 
				
			|||
# Samba can be started in /etc/inetd.conf instead. | 
				
			|||
if [ -x /etc/rc.d/rc.samba ]; then | 
				
			|||
  . /etc/rc.d/rc.samba start | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Start the GPM mouse server: | 
				
			|||
if [ -x /etc/rc.d/rc.gpm ]; then | 
				
			|||
  . /etc/rc.d/rc.gpm start | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# If there are SystemV init scripts for this runlevel, run them. | 
				
			|||
if [ -x /etc/rc.d/rc.sysvinit ]; then | 
				
			|||
  . /etc/rc.d/rc.sysvinit | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Start the local setup procedure. | 
				
			|||
if [ -x /etc/rc.d/rc.local ]; then | 
				
			|||
  . /etc/rc.d/rc.local | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# All done. | 
				
			|||
@ -0,0 +1,448 @@ | 
				
			|||
#!/bin/sh | 
				
			|||
# | 
				
			|||
# /etc/rc.d/rc.S:  System initialization script. | 
				
			|||
# | 
				
			|||
# Mostly written by:  Patrick J. Volkerding, <volkerdi@slackware.com> | 
				
			|||
# | 
				
			|||
 | 
				
			|||
PATH=/sbin:/usr/sbin:/bin:/usr/bin | 
				
			|||
 | 
				
			|||
# Try to mount /proc: | 
				
			|||
/sbin/mount -v proc /proc -n -t proc 2> /dev/null | 
				
			|||
 | 
				
			|||
# Mount sysfs next, if the kernel supports it: | 
				
			|||
if [ -d /sys ]; then | 
				
			|||
  if grep -wq sysfs /proc/filesystems ; then | 
				
			|||
    if ! grep -wq sysfs /proc/mounts ; then | 
				
			|||
      /sbin/mount -v sysfs /sys -n -t sysfs | 
				
			|||
    fi | 
				
			|||
  fi | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# If /run exists, mount a tmpfs on it (unless the | 
				
			|||
# initrd has already done so): | 
				
			|||
if [ -d /run ]; then | 
				
			|||
  if ! grep -wq "tmpfs /run tmpfs" /proc/mounts ; then | 
				
			|||
    /sbin/mount -v -n -t tmpfs tmpfs /run -o mode=0755 | 
				
			|||
  fi | 
				
			|||
 | 
				
			|||
  # Create /run/user for all users. | 
				
			|||
  mkdir -p /run/user | 
				
			|||
  chmod 1733 /run/user | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Load the loop device kernel module: | 
				
			|||
if [ -x /etc/rc.d/rc.loop ]; then | 
				
			|||
  . /etc/rc.d/rc.loop start | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Initialize udev to manage /dev entries and hotplugging. | 
				
			|||
# You may turn off udev by making the /etc/rc.d/rc.udev file non-executable | 
				
			|||
# or giving the "nohotplug" option at boot, but realize that if you turn off | 
				
			|||
# udev that you will have to load all the kernel modules that you need | 
				
			|||
# yourself (possibly in /etc/rc.d/rc.modules.local), and make any additional | 
				
			|||
# device nodes that you need in the /dev directory.  Even USB and IEEE1394 | 
				
			|||
# devices will need to have the modules loaded by hand if udev is not used. | 
				
			|||
# So use it.  :-) | 
				
			|||
if grep -wq sysfs /proc/mounts && grep -q devtmpfs /proc/filesystems ; then | 
				
			|||
  if ! grep -wq nohotplug /proc/cmdline ; then | 
				
			|||
    if [ -x /etc/rc.d/rc.udev ]; then | 
				
			|||
      /bin/sh /etc/rc.d/rc.udev start | 
				
			|||
    fi | 
				
			|||
  fi | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Mount Control Groups filesystem interface: | 
				
			|||
if grep -wq cgroup /proc/filesystems ; then | 
				
			|||
  if [ -d /sys/fs/cgroup ]; then | 
				
			|||
    # See linux-*/Documentation/cgroups/cgroups.txt (section 1.6) | 
				
			|||
    # Check if we have some tools to autodetect the available cgroup controllers | 
				
			|||
    if [ -x /bin/cut -a -x /bin/tail ]; then | 
				
			|||
      # Mount a tmpfs as the cgroup filesystem root | 
				
			|||
      mount -t tmpfs -o mode=0755 cgroup_root /sys/fs/cgroup | 
				
			|||
      # Autodetect available controllers and mount them in subfolders | 
				
			|||
      controllers="$(/bin/cut -f 1 /proc/cgroups | /bin/tail -n +2)" | 
				
			|||
      for i in $controllers; do | 
				
			|||
        mkdir /sys/fs/cgroup/$i | 
				
			|||
        mount -t cgroup -o $i $i /sys/fs/cgroup/$i | 
				
			|||
      done | 
				
			|||
      unset i controllers | 
				
			|||
    else | 
				
			|||
      # We can't use autodetection so fall back mounting them all together | 
				
			|||
      mount -t cgroup cgroup /sys/fs/cgroup | 
				
			|||
    fi | 
				
			|||
  else | 
				
			|||
    mkdir -p /dev/cgroup | 
				
			|||
    mount -t cgroup cgroup /dev/cgroup | 
				
			|||
  fi | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
 | 
				
			|||
# Initialize the Logical Volume Manager. | 
				
			|||
# This won't start unless we find /etc/lvmtab (LVM1) or | 
				
			|||
# /etc/lvm/backup/ (LVM2).  This is created by /sbin/vgscan, so to | 
				
			|||
# use LVM you must run /sbin/vgscan yourself the first time (and | 
				
			|||
# create some VGs and LVs). | 
				
			|||
# Create LVM lock/run directories: | 
				
			|||
mkdir -p -m 0700 /run/lvm /run/lock /run/lock/lvm | 
				
			|||
if [ -r /etc/lvmtab -o -d /etc/lvm/backup ]; then | 
				
			|||
  echo "Initializing LVM (Logical Volume Manager):" | 
				
			|||
  # Check for device-mapper support. | 
				
			|||
  if ! grep -wq device-mapper /proc/devices ; then | 
				
			|||
    # Try to load a device-mapper kernel module: | 
				
			|||
    /sbin/modprobe -q dm-mod | 
				
			|||
  fi | 
				
			|||
  # Scan for new volume groups: | 
				
			|||
  /sbin/vgscan --mknodes --ignorelockingfailure 2> /dev/null | 
				
			|||
  if [ $? = 0 ]; then | 
				
			|||
    # Make volume groups available to the kernel. | 
				
			|||
    # This should also make logical volumes available. | 
				
			|||
    /sbin/vgchange -ay --ignorelockingfailure | 
				
			|||
  fi | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Open any volumes created by cryptsetup. | 
				
			|||
# | 
				
			|||
# Some notes on /etc/crypttab in Slackware: | 
				
			|||
# Only LUKS formatted volumes are supported (except for swap) | 
				
			|||
# crypttab follows the following format: | 
				
			|||
# <luks_name> <device> <password> <options> | 
				
			|||
# | 
				
			|||
# <luks_name>:  This is the name of your LUKS volume. | 
				
			|||
# For example:  crypt-home | 
				
			|||
# | 
				
			|||
# <device>:  This is the device containing your LUKS volume. | 
				
			|||
# For example:  /dev/sda2 | 
				
			|||
# | 
				
			|||
# <password>:  This is either the volume password in plain text, or the name of | 
				
			|||
# a key file.  Use 'none' to interactively enter password on boot. | 
				
			|||
# | 
				
			|||
# <options>:  Comma-separated list of options.  Note that there must be a | 
				
			|||
# password field for any options to be picked up (use a password of 'none' to | 
				
			|||
# get a password prompt at boot).  The following options are supported: | 
				
			|||
# | 
				
			|||
# discard -- this will cause --allow-discards to be passed to the cryptsetup | 
				
			|||
# program while opening the LUKS volume. | 
				
			|||
# | 
				
			|||
# ro -- this will cause --readonly to be passed to the cryptsetup program while | 
				
			|||
# opening the LUKS volume. | 
				
			|||
# | 
				
			|||
# swap -- this option cannot be used with other options.  The device given will | 
				
			|||
# be formatted as a new encrypted volume with a random key on boot, and used as | 
				
			|||
# swap. | 
				
			|||
# | 
				
			|||
if [ -f /etc/crypttab -a -x /sbin/cryptsetup ]; then | 
				
			|||
  # First, check for device-mapper support. | 
				
			|||
  if ! grep -wq device-mapper /proc/devices ; then | 
				
			|||
    # If device-mapper exists as a module, try to load it. | 
				
			|||
    # Try to load a device-mapper kernel module: | 
				
			|||
    /sbin/modprobe -q dm-mod | 
				
			|||
  fi | 
				
			|||
  # NOTE: we only support LUKS formatted volumes (except for swap)! | 
				
			|||
  cat /etc/crypttab | grep -v "^#" | grep -v "^$" | while read line; do | 
				
			|||
    eval LUKSARRAY=( $line ) | 
				
			|||
    LUKS="${LUKSARRAY[0]}" | 
				
			|||
    DEV="${LUKSARRAY[1]}" | 
				
			|||
    PASS="${LUKSARRAY[2]}" | 
				
			|||
    OPTS="${LUKSARRAY[3]}" | 
				
			|||
    LUKSOPTS="" | 
				
			|||
    if echo $OPTS | grep -wq ro ; then LUKSOPTS="${LUKSOPTS} --readonly" ; fi | 
				
			|||
    if echo $OPTS | grep -wq discard ; then LUKSOPTS="${LUKSOPTS} --allow-discards" ; fi | 
				
			|||
    # Skip LUKS volumes that were already unlocked (in the initrd): | 
				
			|||
    /sbin/cryptsetup status $LUKS 2>/dev/null | head -n 1 | grep -q "is active" && continue | 
				
			|||
    if /sbin/cryptsetup isLuks $DEV 2>/dev/null ; then | 
				
			|||
      if [ -z "${LUKSOPTS}" ]; then | 
				
			|||
        echo "Unlocking LUKS encrypted volume '${LUKS}' on device '$DEV':" | 
				
			|||
      else | 
				
			|||
        echo "Unlocking LUKS encrypted volume '${LUKS}' on device '$DEV' with options '${LUKSOPTS}':" | 
				
			|||
      fi | 
				
			|||
      if [ -n "${PASS}" -a "${PASS}" != "none" ]; then | 
				
			|||
        if [ -f "${PASS}" ]; then | 
				
			|||
          # A password was given a key-file filename | 
				
			|||
          /sbin/cryptsetup ${LUKSOPTS} --key-file=${PASS} luksOpen $DEV $LUKS | 
				
			|||
        else | 
				
			|||
          # A password was provided in plain text | 
				
			|||
          echo "${PASS}" | /sbin/cryptsetup ${LUKSOPTS} luksOpen $DEV $LUKS | 
				
			|||
        fi | 
				
			|||
      else | 
				
			|||
        # No password was given, or a password of 'none' was given | 
				
			|||
        /sbin/cryptsetup ${LUKSOPTS} luksOpen $DEV $LUKS </dev/tty0 >/dev/tty0 2>&1 | 
				
			|||
      fi | 
				
			|||
    elif echo $OPTS | grep -wq swap ; then | 
				
			|||
      # If any of the volumes is to be used as encrypted swap, | 
				
			|||
      # then encrypt it using a random key and run mkswap: | 
				
			|||
      echo "Creating encrypted swap volume '${LUKS}' on device '$DEV':" | 
				
			|||
      /sbin/cryptsetup --cipher=aes --key-file=/dev/urandom --key-size=256 create $LUKS $DEV | 
				
			|||
      mkswap /dev/mapper/$LUKS | 
				
			|||
    fi | 
				
			|||
  done | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Enable swapping: | 
				
			|||
/sbin/swapon -a 2> /dev/null | 
				
			|||
 | 
				
			|||
# Start FUSE, if requested: | 
				
			|||
if [ -x /etc/rc.d/rc.fuse ]; then | 
				
			|||
  sh /etc/rc.d/rc.fuse start | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Set the tick and frequency for the system clock. | 
				
			|||
# Default values are: TICK=10000 and FREQ=0 | 
				
			|||
TICK=10000 | 
				
			|||
FREQ=0 | 
				
			|||
# If there's a /etc/default/adjtimex config file, source it to override | 
				
			|||
# the default TICK and FREQ: | 
				
			|||
if [ -r /etc/default/adjtimex ]; then | 
				
			|||
  . /etc/default/adjtimex | 
				
			|||
fi | 
				
			|||
if /sbin/adjtimex --tick $TICK --frequency $FREQ; then | 
				
			|||
  echo "Setting the system clock rate:  /sbin/adjtimex --tick $TICK --frequency $FREQ" | 
				
			|||
else | 
				
			|||
  echo "Failed to set system clock with adjtimex, possibly invalid parameters? (TICK=$TICK FREQ=$FREQ)" | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Set the system time from the hardware clock using hwclock --hctosys. | 
				
			|||
if [ -x /sbin/hwclock ]; then | 
				
			|||
  # Check for a broken motherboard RTC clock (where ioports for rtc are | 
				
			|||
  # unknown) to prevent hwclock causing a hang: | 
				
			|||
  if ! grep -q " : rtc" /proc/ioports ; then | 
				
			|||
    CLOCK_OPT="--directisa" | 
				
			|||
  fi | 
				
			|||
  if [ /etc/adjtime -nt /etc/hardwareclock ]; then | 
				
			|||
    if grep -q "^LOCAL" /etc/adjtime ; then | 
				
			|||
      echo -n "Setting system time from the hardware clock (localtime):  " | 
				
			|||
    else | 
				
			|||
      echo -n "Setting system time from the hardware clock (UTC):  " | 
				
			|||
    fi | 
				
			|||
    /sbin/hwclock $CLOCK_OPT --hctosys | 
				
			|||
  elif grep -wq "^localtime" /etc/hardwareclock 2> /dev/null ; then | 
				
			|||
    echo -n "Setting system time from the hardware clock (localtime):  " | 
				
			|||
    /sbin/hwclock $CLOCK_OPT --localtime --hctosys | 
				
			|||
  else | 
				
			|||
    echo -n "Setting system time from the hardware clock (UTC):  " | 
				
			|||
    /sbin/hwclock $CLOCK_OPT --utc --hctosys | 
				
			|||
  fi | 
				
			|||
  date | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Test to see if the root partition is read-only, like it ought to be. | 
				
			|||
READWRITE=no | 
				
			|||
if touch /fsrwtestfile 2>/dev/null; then | 
				
			|||
  rm -f /fsrwtestfile | 
				
			|||
  READWRITE=yes | 
				
			|||
else | 
				
			|||
  echo "Testing root filesystem status:  read-only filesystem" | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# See if a forced filesystem check was requested at shutdown: | 
				
			|||
if [ -r /etc/forcefsck ]; then | 
				
			|||
  FORCEFSCK="-f" | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Check the root filesystem: | 
				
			|||
if [ ! $READWRITE = yes ]; then | 
				
			|||
  RETVAL=0 | 
				
			|||
  if [ ! -r /etc/fastboot ]; then | 
				
			|||
    echo "Checking root filesystem:" | 
				
			|||
    /sbin/fsck $FORCEFSCK -C -a / | 
				
			|||
    RETVAL=$? | 
				
			|||
  fi | 
				
			|||
  # An error code of 2 or higher will require a reboot. | 
				
			|||
  if [ $RETVAL -ge 2 ]; then | 
				
			|||
    # An error code equal to or greater than 4 means that some errors | 
				
			|||
    # could not be corrected.  This requires manual attention, so we | 
				
			|||
    # offer a chance to try to fix the problem in single-user mode: | 
				
			|||
    if [ $RETVAL -ge 4 ]; then | 
				
			|||
      echo | 
				
			|||
      echo "***********************************************************" | 
				
			|||
      echo "*** An error occurred during the root filesystem check. ***" | 
				
			|||
      echo "*** You will now be given a chance to log into the      ***" | 
				
			|||
      echo "*** system in single-user mode to fix the problem.      ***" | 
				
			|||
      echo "***                                                     ***" | 
				
			|||
      echo "*** If you are using the ext2 filesystem, running       ***" | 
				
			|||
      echo "*** 'e2fsck -v -y <partition>' might help.              ***" | 
				
			|||
      echo "***********************************************************" | 
				
			|||
      echo | 
				
			|||
      echo "Once you exit the single-user shell, the system will reboot." | 
				
			|||
      echo | 
				
			|||
      PS1="(Repair filesystem) \#"; export PS1 | 
				
			|||
      sulogin | 
				
			|||
    else # With an error code of 2 or 3, reboot the machine automatically: | 
				
			|||
      echo | 
				
			|||
      echo "***********************************" | 
				
			|||
      echo "*** The filesystem was changed. ***" | 
				
			|||
      echo "*** The system will now reboot. ***" | 
				
			|||
      echo "***********************************" | 
				
			|||
      echo | 
				
			|||
    fi | 
				
			|||
    echo "Unmounting file systems." | 
				
			|||
    /sbin/umount -a -r | 
				
			|||
    /sbin/mount -n -o remount,ro / | 
				
			|||
    echo "Rebooting system." | 
				
			|||
    sleep 2 | 
				
			|||
    reboot -f | 
				
			|||
  fi | 
				
			|||
  # Remount the root filesystem in read-write mode | 
				
			|||
  echo "Remounting root device with read-write enabled." | 
				
			|||
  /sbin/mount -w -v -n -o remount / | 
				
			|||
  if [ $? -gt 0 ] ; then | 
				
			|||
    echo "FATAL:  Attempt to remount root device as read-write failed!  This is going to" | 
				
			|||
    echo "cause serious problems." | 
				
			|||
  fi | 
				
			|||
else | 
				
			|||
  echo "Testing root filesystem status:  read-write filesystem" | 
				
			|||
  echo | 
				
			|||
  echo "ERROR: Root partition has already been mounted read-write. Cannot check!" | 
				
			|||
  echo | 
				
			|||
  echo "For filesystem checking to work properly, your system must initially mount" | 
				
			|||
  echo "the root partition as read only.  If you're booting with LILO, add a line:" | 
				
			|||
  echo | 
				
			|||
  echo "   read-only" | 
				
			|||
  echo | 
				
			|||
  echo "to the Linux section in your /etc/lilo.conf and type 'lilo' to reinstall it." | 
				
			|||
fi # Done checking root filesystem | 
				
			|||
 | 
				
			|||
 | 
				
			|||
# Any /etc/mtab that exists here is old, so we start with a new one: | 
				
			|||
/bin/rm -f /etc/mtab{,~,.tmp} && /bin/touch /etc/mtab | 
				
			|||
 | 
				
			|||
# Add entry for / to /etc/mtab: | 
				
			|||
/sbin/mount -f -w / | 
				
			|||
 | 
				
			|||
# Add /proc, /sys, and /dev/shm mounts to /etc/mtab: | 
				
			|||
if [ -d /proc/sys ]; then | 
				
			|||
  /sbin/mount -f -t proc proc /proc | 
				
			|||
fi | 
				
			|||
if [ -d /sys/bus ]; then | 
				
			|||
  /sbin/mount -f -t sysfs sysfs /sys | 
				
			|||
fi | 
				
			|||
if grep -q '^[^ ]\+ /dev/shm ' /proc/mounts 2> /dev/null ; then | 
				
			|||
  /sbin/mount -f -t tmpfs tmpfs /dev/shm | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Configure ISA Plug-and-Play devices: | 
				
			|||
if [ -r /etc/isapnp.conf ]; then | 
				
			|||
  if [ -x /sbin/isapnp ]; then | 
				
			|||
    /sbin/isapnp /etc/isapnp.conf | 
				
			|||
  fi | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Run the kernel module script.  This updates the module dependencies and | 
				
			|||
# also supports manually loading kernel modules through rc.modules.local. | 
				
			|||
if [ -x /etc/rc.d/rc.modules ]; then | 
				
			|||
  . /etc/rc.d/rc.modules | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Configure kernel parameters: | 
				
			|||
if [ -x /sbin/sysctl -a -r /etc/sysctl.conf ]; then | 
				
			|||
  echo "Configuring kernel parameters:  /sbin/sysctl -e --system" | 
				
			|||
  /sbin/sysctl -e --system | 
				
			|||
elif [ -x /sbin/sysctl  ]; then | 
				
			|||
  echo "Configuring kernel parameters:  /sbin/sysctl -e --system" | 
				
			|||
  # Don't say "Applying /etc/sysctl.conf" or complain if the file doesn't exist | 
				
			|||
  /sbin/sysctl -e --system 2> /dev/null | grep -v "Applying /etc/sysctl.conf" | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Check all the non-root filesystems: | 
				
			|||
if [ ! -r /etc/fastboot ]; then | 
				
			|||
  echo "Checking non-root filesystems:" | 
				
			|||
  /sbin/fsck $FORCEFSCK -C -R -A -a | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Mount usbfs only if it is found in /etc/fstab: | 
				
			|||
if grep -wq usbfs /proc/filesystems; then | 
				
			|||
  if ! grep -wq usbfs /proc/mounts ; then | 
				
			|||
    if grep -wq usbfs /etc/fstab; then | 
				
			|||
      /sbin/mount -v /proc/bus/usb | 
				
			|||
    fi | 
				
			|||
  fi | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Mount non-root file systems in fstab, but not NFS or SMB  | 
				
			|||
# because TCP/IP is not yet configured, and not proc or sysfs | 
				
			|||
# because those have already been mounted.  Also check that | 
				
			|||
# devpts is not already mounted before attempting to mount | 
				
			|||
# it.  With a 2.6.x or newer kernel udev mounts devpts. | 
				
			|||
# We also need to wait a little bit to let USB and other | 
				
			|||
# hotplugged devices settle (sorry to slow down the boot): | 
				
			|||
echo "Mounting non-root local filesystems:" | 
				
			|||
if /bin/grep -wq devpts /proc/mounts ; then | 
				
			|||
  # This pipe after the mount command is just to convert the new | 
				
			|||
  # mount verbose output back to the old format that contained | 
				
			|||
  # more useful information: | 
				
			|||
  /sbin/mount -a -v -t nonfs,nosmbfs,nocifs,noproc,nosysfs,nodevpts | grep successfully | cut -f 1 -d : | tr -d ' ' | while read dev ; do mount | grep "${dev} " ; done | 
				
			|||
else | 
				
			|||
  /sbin/mount -a -v -t nonfs,nosmbfs,nocifs,noproc,nosysfs | grep successfully | cut -f 1 -d : | tr -d ' ' | while read dev ; do mount | grep "${dev} " ; done | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Enable swapping again.  This is needed in case a swapfile is used, | 
				
			|||
# as it can't be enabled until the filesystem it resides on has been | 
				
			|||
# mounted read-write. | 
				
			|||
/sbin/swapon -a 2> /dev/null | 
				
			|||
 | 
				
			|||
# Start cgmanager (or cgproxy in a container): | 
				
			|||
if [ -x /etc/rc.d/rc.cgmanager -a -d /sys/fs/cgroup ]; then | 
				
			|||
  sh /etc/rc.d/rc.cgmanager start | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Clean up some temporary files: | 
				
			|||
rm -f /var/run/* /var/run/*/* /var/run/*/*/* /etc/nologin \ | 
				
			|||
  /etc/dhcpc/*.pid /etc/forcefsck /etc/fastboot \ | 
				
			|||
  /var/state/saslauthd/saslauthd.pid \ | 
				
			|||
  /tmp/.Xauth* 1> /dev/null 2> /dev/null | 
				
			|||
  ( cd /var/log/setup/tmp && rm -rf * ) | 
				
			|||
  ( cd /tmp && rm -rf kde-[a-zA-Z]* ksocket-[a-zA-Z]* hsperfdata_[a-zA-Z]* plugtmp* ) | 
				
			|||
 | 
				
			|||
# Clear /var/lock/subsys: | 
				
			|||
if [ -d /var/lock/subsys ]; then | 
				
			|||
  rm -f /var/lock/subsys/* | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Create /tmp/{.ICE-unix,.X11-unix} if they are not present: | 
				
			|||
if [ ! -e /tmp/.ICE-unix ]; then | 
				
			|||
  mkdir -p /tmp/.ICE-unix | 
				
			|||
  chmod 1777 /tmp/.ICE-unix | 
				
			|||
fi | 
				
			|||
if [ ! -e /tmp/.X11-unix ]; then | 
				
			|||
  mkdir -p /tmp/.X11-unix | 
				
			|||
  chmod 1777 /tmp/.X11-unix | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Create a fresh utmp file: | 
				
			|||
touch /var/run/utmp | 
				
			|||
chown root:utmp /var/run/utmp | 
				
			|||
chmod 664 /var/run/utmp | 
				
			|||
 | 
				
			|||
# Update the current kernel level in the /etc/motd (Message Of The Day) file, | 
				
			|||
# if the first line of that file begins with the word 'Linux'. | 
				
			|||
# You are free to modify the rest of the file as you see fit. | 
				
			|||
if [ -x /bin/sed ]; then | 
				
			|||
  /bin/sed -i "{1s/^Linux.*/$(/bin/uname -sr)\./}" /etc/motd | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# If there are SystemV init scripts for this runlevel, run them. | 
				
			|||
if [ -x /etc/rc.d/rc.sysvinit ]; then | 
				
			|||
  . /etc/rc.d/rc.sysvinit | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Run serial port setup script: | 
				
			|||
# CAREFUL!  This can make some systems hang if the rc.serial script isn't | 
				
			|||
# set up correctly.  If this happens, you may have to edit the file from a | 
				
			|||
# boot disk, and/or set it as non-executable: | 
				
			|||
if [ -x /etc/rc.d/rc.serial ]; then | 
				
			|||
  sh /etc/rc.d/rc.serial start | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Carry an entropy pool between reboots to improve randomness. | 
				
			|||
if [ -f /etc/random-seed ]; then | 
				
			|||
  echo "Using /etc/random-seed to initialize /dev/urandom." | 
				
			|||
  cat /etc/random-seed > /dev/urandom | 
				
			|||
fi | 
				
			|||
# Use the pool size from /proc, or 4096 bits: | 
				
			|||
if [ -r /proc/sys/kernel/random/poolsize ]; then | 
				
			|||
  dd if=/dev/urandom of=/etc/random-seed count=1 bs=$(expr $(cat /proc/sys/kernel/random/poolsize) / 8) 2> /dev/null | 
				
			|||
else | 
				
			|||
  dd if=/dev/urandom of=/etc/random-seed count=1 bs=512 2> /dev/null | 
				
			|||
fi | 
				
			|||
chmod 600 /etc/random-seed | 
				
			|||
 | 
				
			|||
@ -0,0 +1,445 @@ | 
				
			|||
#!/bin/sh | 
				
			|||
# | 
				
			|||
# /etc/rc.d/rc.S:  System initialization script. | 
				
			|||
# | 
				
			|||
# Mostly written by:  Patrick J. Volkerding, <volkerdi@slackware.com> | 
				
			|||
# | 
				
			|||
 | 
				
			|||
PATH=/sbin:/usr/sbin:/bin:/usr/bin | 
				
			|||
 | 
				
			|||
# Try to mount /proc: | 
				
			|||
/sbin/mount -v proc /proc -n -t proc 2> /dev/null | 
				
			|||
 | 
				
			|||
# Mount sysfs next, if the kernel supports it: | 
				
			|||
if [ -d /sys ]; then | 
				
			|||
  if grep -wq sysfs /proc/filesystems ; then | 
				
			|||
    if ! grep -wq sysfs /proc/mounts ; then | 
				
			|||
      /sbin/mount -v sysfs /sys -n -t sysfs | 
				
			|||
    fi | 
				
			|||
  fi | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# If /run exists, mount a tmpfs on it (unless the | 
				
			|||
# initrd has already done so): | 
				
			|||
if [ -d /run ]; then | 
				
			|||
  if ! grep -wq "tmpfs /run tmpfs" /proc/mounts ; then | 
				
			|||
    /sbin/mount -v -n -t tmpfs tmpfs /run -o mode=0755 | 
				
			|||
  fi | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Load the loop device kernel module: | 
				
			|||
if [ -x /etc/rc.d/rc.loop ]; then | 
				
			|||
  . /etc/rc.d/rc.loop start | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Initialize udev to manage /dev entries and hotplugging. | 
				
			|||
# You may turn off udev by making the /etc/rc.d/rc.udev file non-executable | 
				
			|||
# or giving the "nohotplug" option at boot, but realize that if you turn off | 
				
			|||
# udev that you will have to load all the kernel modules that you need | 
				
			|||
# yourself (possibly in /etc/rc.d/rc.modules.local), and make any additional | 
				
			|||
# device nodes that you need in the /dev directory.  Even USB and IEEE1394 | 
				
			|||
# devices will need to have the modules loaded by hand if udev is not used. | 
				
			|||
# So use it.  :-) | 
				
			|||
if grep -wq sysfs /proc/mounts && grep -q devtmpfs /proc/filesystems ; then | 
				
			|||
  if ! grep -wq nohotplug /proc/cmdline ; then | 
				
			|||
    if [ -x /etc/rc.d/rc.udev ]; then | 
				
			|||
      /bin/sh /etc/rc.d/rc.udev start | 
				
			|||
    fi | 
				
			|||
  fi | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Mount Control Groups filesystem interface: | 
				
			|||
if grep -wq cgroup /proc/filesystems ; then | 
				
			|||
  if [ -d /sys/fs/cgroup ]; then | 
				
			|||
    # See linux-*/Documentation/cgroups/cgroups.txt (section 1.6) | 
				
			|||
    # Check if we have some tools to autodetect the available cgroup controllers | 
				
			|||
    if [ -x /bin/cut -a -x /bin/tail ]; then | 
				
			|||
      # Mount a tmpfs as the cgroup filesystem root | 
				
			|||
      mount -t tmpfs -o mode=0755 cgroup_root /sys/fs/cgroup | 
				
			|||
      # Autodetect available controllers and mount them in subfolders | 
				
			|||
      controllers="$(/bin/cut -f 1 /proc/cgroups | /bin/tail -n +2)" | 
				
			|||
      for i in $controllers; do | 
				
			|||
        mkdir /sys/fs/cgroup/$i | 
				
			|||
        mount -t cgroup -o $i $i /sys/fs/cgroup/$i | 
				
			|||
      done | 
				
			|||
      unset i controllers | 
				
			|||
    else | 
				
			|||
      # We can't use autodetection so fall back mounting them all together | 
				
			|||
      mount -t cgroup cgroup /sys/fs/cgroup | 
				
			|||
    fi | 
				
			|||
  else | 
				
			|||
    mkdir -p /dev/cgroup | 
				
			|||
    mount -t cgroup cgroup /dev/cgroup | 
				
			|||
  fi | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
 | 
				
			|||
# Initialize the Logical Volume Manager. | 
				
			|||
# This won't start unless we find /etc/lvmtab (LVM1) or | 
				
			|||
# /etc/lvm/backup/ (LVM2).  This is created by /sbin/vgscan, so to | 
				
			|||
# use LVM you must run /sbin/vgscan yourself the first time (and | 
				
			|||
# create some VGs and LVs). | 
				
			|||
# Create LVM lock/run directories: | 
				
			|||
mkdir -p -m 0700 /run/lvm /run/lock /run/lock/lvm | 
				
			|||
if [ -r /etc/lvmtab -o -d /etc/lvm/backup ]; then | 
				
			|||
  echo "Initializing LVM (Logical Volume Manager):" | 
				
			|||
  # Check for device-mapper support. | 
				
			|||
  if ! grep -wq device-mapper /proc/devices ; then | 
				
			|||
    # Try to load a device-mapper kernel module: | 
				
			|||
    /sbin/modprobe -q dm-mod | 
				
			|||
  fi | 
				
			|||
  # Scan for new volume groups: | 
				
			|||
  /sbin/vgscan --mknodes --ignorelockingfailure 2> /dev/null | 
				
			|||
  if [ $? = 0 ]; then | 
				
			|||
    # Make volume groups available to the kernel. | 
				
			|||
    # This should also make logical volumes available. | 
				
			|||
    /sbin/vgchange -ay --ignorelockingfailure | 
				
			|||
  fi | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Open any volumes created by cryptsetup. | 
				
			|||
# | 
				
			|||
# Some notes on /etc/crypttab in Slackware: | 
				
			|||
# Only LUKS formatted volumes are supported (except for swap) | 
				
			|||
# crypttab follows the following format: | 
				
			|||
# <luks_name> <device> <password> <options> | 
				
			|||
# | 
				
			|||
# <luks_name>:  This is the name of your LUKS volume. | 
				
			|||
# For example:  crypt-home | 
				
			|||
# | 
				
			|||
# <device>:  This is the device containing your LUKS volume. | 
				
			|||
# For example:  /dev/sda2 | 
				
			|||
# | 
				
			|||
# <password>:  This is either the volume password in plain text, or the name of | 
				
			|||
# a key file.  Use 'none' to interactively enter password on boot. | 
				
			|||
# | 
				
			|||
# <options>:  Comma-separated list of options.  Note that there must be a | 
				
			|||
# password field for any options to be picked up (use a password of 'none' to | 
				
			|||
# get a password prompt at boot).  The following options are supported: | 
				
			|||
# | 
				
			|||
# discard -- this will cause --allow-discards to be passed to the cryptsetup | 
				
			|||
# program while opening the LUKS volume. | 
				
			|||
# | 
				
			|||
# ro -- this will cause --readonly to be passed to the cryptsetup program while | 
				
			|||
# opening the LUKS volume. | 
				
			|||
# | 
				
			|||
# swap -- this option cannot be used with other options.  The device given will | 
				
			|||
# be formatted as a new encrypted volume with a random key on boot, and used as | 
				
			|||
# swap. | 
				
			|||
# | 
				
			|||
if [ -f /etc/crypttab -a -x /sbin/cryptsetup ]; then | 
				
			|||
  # First, check for device-mapper support. | 
				
			|||
  if ! grep -wq device-mapper /proc/devices ; then | 
				
			|||
    # If device-mapper exists as a module, try to load it. | 
				
			|||
    # Try to load a device-mapper kernel module: | 
				
			|||
    /sbin/modprobe -q dm-mod | 
				
			|||
  fi | 
				
			|||
  # NOTE: we only support LUKS formatted volumes (except for swap)! | 
				
			|||
  cat /etc/crypttab | grep -v "^#" | grep -v "^$" | while read line; do | 
				
			|||
    eval LUKSARRAY=( $line ) | 
				
			|||
    LUKS="${LUKSARRAY[0]}" | 
				
			|||
    DEV="${LUKSARRAY[1]}" | 
				
			|||
    PASS="${LUKSARRAY[2]}" | 
				
			|||
    OPTS="${LUKSARRAY[3]}" | 
				
			|||
    LUKSOPTS="" | 
				
			|||
    if echo $OPTS | grep -wq ro ; then LUKSOPTS="${LUKSOPTS} --readonly" ; fi | 
				
			|||
    if echo $OPTS | grep -wq discard ; then LUKSOPTS="${LUKSOPTS} --allow-discards" ; fi | 
				
			|||
    # Skip LUKS volumes that were already unlocked (in the initrd): | 
				
			|||
    /sbin/cryptsetup status $LUKS 2>/dev/null | head -n 1 | grep -q "is active" && continue | 
				
			|||
    if /sbin/cryptsetup isLuks $DEV 2>/dev/null ; then | 
				
			|||
      if [ -z "${LUKSOPTS}" ]; then | 
				
			|||
        echo "Unlocking LUKS encrypted volume '${LUKS}' on device '$DEV':" | 
				
			|||
      else | 
				
			|||
        echo "Unlocking LUKS encrypted volume '${LUKS}' on device '$DEV' with options '${LUKSOPTS}':" | 
				
			|||
      fi | 
				
			|||
      if [ -n "${PASS}" -a "${PASS}" != "none" ]; then | 
				
			|||
        if [ -f "${PASS}" ]; then | 
				
			|||
          # A password was given a key-file filename | 
				
			|||
          /sbin/cryptsetup ${LUKSOPTS} --key-file=${PASS} luksOpen $DEV $LUKS | 
				
			|||
        else | 
				
			|||
          # A password was provided in plain text | 
				
			|||
          echo "${PASS}" | /sbin/cryptsetup ${LUKSOPTS} luksOpen $DEV $LUKS | 
				
			|||
        fi | 
				
			|||
      else | 
				
			|||
        # No password was given, or a password of 'none' was given | 
				
			|||
        /sbin/cryptsetup ${LUKSOPTS} luksOpen $DEV $LUKS </dev/tty0 >/dev/tty0 2>&1 | 
				
			|||
      fi | 
				
			|||
    elif echo $OPTS | grep -wq swap ; then | 
				
			|||
      # If any of the volumes is to be used as encrypted swap, | 
				
			|||
      # then encrypt it using a random key and run mkswap: | 
				
			|||
      echo "Creating encrypted swap volume '${LUKS}' on device '$DEV':" | 
				
			|||
      /sbin/cryptsetup --cipher=aes --key-file=/dev/urandom --key-size=256 create $LUKS $DEV | 
				
			|||
      mkswap /dev/mapper/$LUKS | 
				
			|||
    fi | 
				
			|||
  done | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Enable swapping: | 
				
			|||
/sbin/swapon -a 2> /dev/null | 
				
			|||
 | 
				
			|||
# Start FUSE, if requested: | 
				
			|||
if [ -x /etc/rc.d/rc.fuse ]; then | 
				
			|||
  sh /etc/rc.d/rc.fuse start | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Set the tick and frequency for the system clock. | 
				
			|||
# Default values are: TICK=10000 and FREQ=0 | 
				
			|||
TICK=10000 | 
				
			|||
FREQ=0 | 
				
			|||
# If there's a /etc/default/adjtimex config file, source it to override | 
				
			|||
# the default TICK and FREQ: | 
				
			|||
if [ -r /etc/default/adjtimex ]; then | 
				
			|||
  . /etc/default/adjtimex | 
				
			|||
fi | 
				
			|||
if /sbin/adjtimex --tick $TICK --frequency $FREQ; then | 
				
			|||
  echo "Setting the system clock rate:  /sbin/adjtimex --tick $TICK --frequency $FREQ" | 
				
			|||
else | 
				
			|||
  echo "Failed to set system clock with adjtimex, possibly invalid parameters? (TICK=$TICK FREQ=$FREQ)" | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Set the system time from the hardware clock using hwclock --hctosys. | 
				
			|||
if [ -x /sbin/hwclock ]; then | 
				
			|||
  # Check for a broken motherboard RTC clock (where ioports for rtc are | 
				
			|||
  # unknown) to prevent hwclock causing a hang: | 
				
			|||
  if ! grep -q " : rtc" /proc/ioports ; then | 
				
			|||
    CLOCK_OPT="--directisa" | 
				
			|||
  fi | 
				
			|||
  if [ /etc/adjtime -nt /etc/hardwareclock ]; then | 
				
			|||
    if grep -q "^LOCAL" /etc/adjtime ; then | 
				
			|||
      echo -n "Setting system time from the hardware clock (localtime):  " | 
				
			|||
    else | 
				
			|||
      echo -n "Setting system time from the hardware clock (UTC):  " | 
				
			|||
    fi | 
				
			|||
    /sbin/hwclock $CLOCK_OPT --hctosys | 
				
			|||
  elif grep -wq "^localtime" /etc/hardwareclock 2> /dev/null ; then | 
				
			|||
    echo -n "Setting system time from the hardware clock (localtime):  " | 
				
			|||
    /sbin/hwclock $CLOCK_OPT --localtime --hctosys | 
				
			|||
  else | 
				
			|||
    echo -n "Setting system time from the hardware clock (UTC):  " | 
				
			|||
    /sbin/hwclock $CLOCK_OPT --utc --hctosys | 
				
			|||
  fi | 
				
			|||
  date | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Test to see if the root partition is read-only, like it ought to be. | 
				
			|||
READWRITE=no | 
				
			|||
if touch /fsrwtestfile 2>/dev/null; then | 
				
			|||
  rm -f /fsrwtestfile | 
				
			|||
  READWRITE=yes | 
				
			|||
else | 
				
			|||
  echo "Testing root filesystem status:  read-only filesystem" | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# See if a forced filesystem check was requested at shutdown: | 
				
			|||
if [ -r /etc/forcefsck ]; then | 
				
			|||
  FORCEFSCK="-f" | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Check the root filesystem: | 
				
			|||
if [ ! $READWRITE = yes ]; then | 
				
			|||
  RETVAL=0 | 
				
			|||
  if [ ! -r /etc/fastboot ]; then | 
				
			|||
    echo "Checking root filesystem:" | 
				
			|||
    /sbin/fsck $FORCEFSCK -C -a / | 
				
			|||
    RETVAL=$? | 
				
			|||
  fi | 
				
			|||
  # An error code of 2 or higher will require a reboot. | 
				
			|||
  if [ $RETVAL -ge 2 ]; then | 
				
			|||
    # An error code equal to or greater than 4 means that some errors | 
				
			|||
    # could not be corrected.  This requires manual attention, so we | 
				
			|||
    # offer a chance to try to fix the problem in single-user mode: | 
				
			|||
    if [ $RETVAL -ge 4 ]; then | 
				
			|||
      echo | 
				
			|||
      echo "***********************************************************" | 
				
			|||
      echo "*** An error occurred during the root filesystem check. ***" | 
				
			|||
      echo "*** You will now be given a chance to log into the      ***" | 
				
			|||
      echo "*** system in single-user mode to fix the problem.      ***" | 
				
			|||
      echo "***                                                     ***" | 
				
			|||
      echo "*** If you are using the ext2 filesystem, running       ***" | 
				
			|||
      echo "*** 'e2fsck -v -y <partition>' might help.              ***" | 
				
			|||
      echo "***********************************************************" | 
				
			|||
      echo | 
				
			|||
      echo "Once you exit the single-user shell, the system will reboot." | 
				
			|||
      echo | 
				
			|||
      PS1="(Repair filesystem) \#"; export PS1 | 
				
			|||
      sulogin | 
				
			|||
    else # With an error code of 2 or 3, reboot the machine automatically: | 
				
			|||
      echo | 
				
			|||
      echo "***********************************" | 
				
			|||
      echo "*** The filesystem was changed. ***" | 
				
			|||
      echo "*** The system will now reboot. ***" | 
				
			|||
      echo "***********************************" | 
				
			|||
      echo | 
				
			|||
    fi | 
				
			|||
    echo "Unmounting file systems." | 
				
			|||
    /sbin/umount -a -r | 
				
			|||
    /sbin/mount -n -o remount,ro / | 
				
			|||
    echo "Rebooting system." | 
				
			|||
    sleep 2 | 
				
			|||
    reboot -f | 
				
			|||
  fi | 
				
			|||
  # Remount the root filesystem in read-write mode | 
				
			|||
  echo "Remounting root device with read-write enabled." | 
				
			|||
  /sbin/mount -w -v -n -o remount / | 
				
			|||
  if [ $? -gt 0 ] ; then | 
				
			|||
    echo "FATAL:  Attempt to remount root device as read-write failed!  This is going to" | 
				
			|||
    echo "cause serious problems." | 
				
			|||
  fi | 
				
			|||
else | 
				
			|||
  echo "Testing root filesystem status:  read-write filesystem" | 
				
			|||
  echo | 
				
			|||
  echo "ERROR: Root partition has already been mounted read-write. Cannot check!" | 
				
			|||
  echo | 
				
			|||
  echo "For filesystem checking to work properly, your system must initially mount" | 
				
			|||
  echo "the root partition as read only.  If you're booting with LILO, add a line:" | 
				
			|||
  echo | 
				
			|||
  echo "   read-only" | 
				
			|||
  echo | 
				
			|||
  echo "to the Linux section in your /etc/lilo.conf and type 'lilo' to reinstall it." | 
				
			|||
fi # Done checking root filesystem | 
				
			|||
 | 
				
			|||
 | 
				
			|||
# Any /etc/mtab that exists here is old, so we start with a new one: | 
				
			|||
/bin/rm -f /etc/mtab{,~,.tmp} && /bin/touch /etc/mtab | 
				
			|||
 | 
				
			|||
# Add entry for / to /etc/mtab: | 
				
			|||
/sbin/mount -f -w / | 
				
			|||
 | 
				
			|||
# Add /proc, /sys, and /dev/shm mounts to /etc/mtab: | 
				
			|||
if [ -d /proc/sys ]; then | 
				
			|||
  /sbin/mount -f -t proc proc /proc | 
				
			|||
fi | 
				
			|||
if [ -d /sys/bus ]; then | 
				
			|||
  /sbin/mount -f -t sysfs sysfs /sys | 
				
			|||
fi | 
				
			|||
if grep -q '^[^ ]\+ /dev/shm ' /proc/mounts 2> /dev/null ; then | 
				
			|||
  /sbin/mount -f -t tmpfs tmpfs /dev/shm | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Configure ISA Plug-and-Play devices: | 
				
			|||
if [ -r /etc/isapnp.conf ]; then | 
				
			|||
  if [ -x /sbin/isapnp ]; then | 
				
			|||
    /sbin/isapnp /etc/isapnp.conf | 
				
			|||
  fi | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Run the kernel module script.  This updates the module dependencies and | 
				
			|||
# also supports manually loading kernel modules through rc.modules.local. | 
				
			|||
if [ -x /etc/rc.d/rc.modules ]; then | 
				
			|||
  . /etc/rc.d/rc.modules | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Configure kernel parameters: | 
				
			|||
if [ -x /sbin/sysctl -a -r /etc/sysctl.conf ]; then | 
				
			|||
  echo "Configuring kernel parameters:  /sbin/sysctl -e --system" | 
				
			|||
  /sbin/sysctl -e --system | 
				
			|||
elif [ -x /sbin/sysctl  ]; then | 
				
			|||
  echo "Configuring kernel parameters:  /sbin/sysctl -e --system" | 
				
			|||
  # Don't say "Applying /etc/sysctl.conf" or complain if the file doesn't exist | 
				
			|||
  /sbin/sysctl -e --system 2> /dev/null | grep -v "Applying /etc/sysctl.conf" | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Check all the non-root filesystems: | 
				
			|||
if [ ! -r /etc/fastboot ]; then | 
				
			|||
  echo "Checking non-root filesystems:" | 
				
			|||
  /sbin/fsck $FORCEFSCK -C -R -A -a | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Mount usbfs only if it is found in /etc/fstab: | 
				
			|||
if grep -wq usbfs /proc/filesystems; then | 
				
			|||
  if ! grep -wq usbfs /proc/mounts ; then | 
				
			|||
    if grep -wq usbfs /etc/fstab; then | 
				
			|||
      /sbin/mount -v /proc/bus/usb | 
				
			|||
    fi | 
				
			|||
  fi | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Mount non-root file systems in fstab, but not NFS or SMB  | 
				
			|||
# because TCP/IP is not yet configured, and not proc or sysfs | 
				
			|||
# because those have already been mounted.  Also check that | 
				
			|||
# devpts is not already mounted before attempting to mount | 
				
			|||
# it.  With a 2.6.x or newer kernel udev mounts devpts. | 
				
			|||
# We also need to wait a little bit to let USB and other | 
				
			|||
# hotplugged devices settle (sorry to slow down the boot): | 
				
			|||
echo "Mounting non-root local filesystems:" | 
				
			|||
sleep 3 | 
				
			|||
if /bin/grep -wq devpts /proc/mounts ; then | 
				
			|||
  # This pipe after the mount command is just to convert the new | 
				
			|||
  # mount verbose output back to the old format that contained | 
				
			|||
  # more useful information: | 
				
			|||
  /sbin/mount -a -v -t nonfs,nosmbfs,nocifs,noproc,nosysfs,nodevpts | grep successfully | cut -f 1 -d : | tr -d ' ' | while read dev ; do mount | grep "${dev} " ; done | 
				
			|||
else | 
				
			|||
  /sbin/mount -a -v -t nonfs,nosmbfs,nocifs,noproc,nosysfs | grep successfully | cut -f 1 -d : | tr -d ' ' | while read dev ; do mount | grep "${dev} " ; done | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Enable swapping again.  This is needed in case a swapfile is used, | 
				
			|||
# as it can't be enabled until the filesystem it resides on has been | 
				
			|||
# mounted read-write. | 
				
			|||
/sbin/swapon -a 2> /dev/null | 
				
			|||
 | 
				
			|||
# Start cgmanager (or cgproxy in a container): | 
				
			|||
if [ -x /etc/rc.d/rc.cgmanager -a -d /sys/fs/cgroup ]; then | 
				
			|||
  sh /etc/rc.d/rc.cgmanager start | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Clean up some temporary files: | 
				
			|||
rm -f /var/run/* /var/run/*/* /var/run/*/*/* /etc/nologin \ | 
				
			|||
  /etc/dhcpc/*.pid /etc/forcefsck /etc/fastboot \ | 
				
			|||
  /var/state/saslauthd/saslauthd.pid \ | 
				
			|||
  /tmp/.Xauth* 1> /dev/null 2> /dev/null | 
				
			|||
  ( cd /var/log/setup/tmp && rm -rf * ) | 
				
			|||
  ( cd /tmp && rm -rf kde-[a-zA-Z]* ksocket-[a-zA-Z]* hsperfdata_[a-zA-Z]* plugtmp* ) | 
				
			|||
 | 
				
			|||
# Clear /var/lock/subsys: | 
				
			|||
if [ -d /var/lock/subsys ]; then | 
				
			|||
  rm -f /var/lock/subsys/* | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Create /tmp/{.ICE-unix,.X11-unix} if they are not present: | 
				
			|||
if [ ! -e /tmp/.ICE-unix ]; then | 
				
			|||
  mkdir -p /tmp/.ICE-unix | 
				
			|||
  chmod 1777 /tmp/.ICE-unix | 
				
			|||
fi | 
				
			|||
if [ ! -e /tmp/.X11-unix ]; then | 
				
			|||
  mkdir -p /tmp/.X11-unix | 
				
			|||
  chmod 1777 /tmp/.X11-unix | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Create a fresh utmp file: | 
				
			|||
touch /var/run/utmp | 
				
			|||
chown root:utmp /var/run/utmp | 
				
			|||
chmod 664 /var/run/utmp | 
				
			|||
 | 
				
			|||
# Update the current kernel level in the /etc/motd (Message Of The Day) file, | 
				
			|||
# if the first line of that file begins with the word 'Linux'. | 
				
			|||
# You are free to modify the rest of the file as you see fit. | 
				
			|||
if [ -x /bin/sed ]; then | 
				
			|||
  /bin/sed -i "{1s/^Linux.*/$(/bin/uname -sr)\./}" /etc/motd | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# If there are SystemV init scripts for this runlevel, run them. | 
				
			|||
if [ -x /etc/rc.d/rc.sysvinit ]; then | 
				
			|||
  . /etc/rc.d/rc.sysvinit | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Run serial port setup script: | 
				
			|||
# CAREFUL!  This can make some systems hang if the rc.serial script isn't | 
				
			|||
# set up correctly.  If this happens, you may have to edit the file from a | 
				
			|||
# boot disk, and/or set it as non-executable: | 
				
			|||
if [ -x /etc/rc.d/rc.serial ]; then | 
				
			|||
  sh /etc/rc.d/rc.serial start | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
# Carry an entropy pool between reboots to improve randomness. | 
				
			|||
if [ -f /etc/random-seed ]; then | 
				
			|||
  echo "Using /etc/random-seed to initialize /dev/urandom." | 
				
			|||
  cat /etc/random-seed > /dev/urandom | 
				
			|||
fi | 
				
			|||
# Use the pool size from /proc, or 4096 bits: | 
				
			|||
if [ -r /proc/sys/kernel/random/poolsize ]; then | 
				
			|||
  dd if=/dev/urandom of=/etc/random-seed count=1 bs=$(expr $(cat /proc/sys/kernel/random/poolsize) / 8) 2> /dev/null | 
				
			|||
else | 
				
			|||
  dd if=/dev/urandom of=/etc/random-seed count=1 bs=512 2> /dev/null | 
				
			|||
fi | 
				
			|||
chmod 600 /etc/random-seed | 
				
			|||
 | 
				
			|||
@ -0,0 +1,88 @@ | 
				
			|||
#!/bin/sh | 
				
			|||
# Load the mixer settings and OSS compatibility (if enabled) for ALSA. | 
				
			|||
# (the Advanced Linux Sound Architecture) | 
				
			|||
 | 
				
			|||
# A function to load the ALSA mixer settings: | 
				
			|||
load_alsa_mixer() { | 
				
			|||
  if [ -r /var/lib/alsa/asound.state ]; then | 
				
			|||
    echo "Loading ALSA mixer settings:  /usr/sbin/alsactl restore" | 
				
			|||
    /usr/sbin/alsactl restore | 
				
			|||
  else | 
				
			|||
    # It's possible a user might not want to set a default sound state. | 
				
			|||
    # In that case, do this:  touch /var/lib/alsa/no.asound.state | 
				
			|||
    if [ ! -r /var/lib/alsa/no.asound.state ]; then | 
				
			|||
      echo "Setting default ALSA mixer settings." | 
				
			|||
      # set default mixer volumes for ALSA | 
				
			|||
      # Taken from the alsaconf script. | 
				
			|||
      amixer -s -q <<EOF | 
				
			|||
set Master 75% unmute | 
				
			|||
set Master -12dB | 
				
			|||
set 'Master Mono' 75% unmute | 
				
			|||
set 'Master Mono' -12dB | 
				
			|||
set Front 75% unmute | 
				
			|||
set Front -12dB | 
				
			|||
set PCM 90% unmute | 
				
			|||
set PCM 0dB | 
				
			|||
mixer Synth 90% unmute | 
				
			|||
mixer Synth 0dB | 
				
			|||
mixer CD 90% unmute | 
				
			|||
mixer CD 0dB | 
				
			|||
# mute mic | 
				
			|||
set Mic 0% mute | 
				
			|||
# ESS 1969 chipset has 2 PCM channels | 
				
			|||
set PCM,1 90% unmute | 
				
			|||
set PCM,1 0dB | 
				
			|||
# Trident/YMFPCI/emu10k1 | 
				
			|||
set Wave 100% unmute | 
				
			|||
set Music 100% unmute | 
				
			|||
set AC97 100% unmute | 
				
			|||
# CS4237B chipset: | 
				
			|||
set 'Master Digital' 75% unmute | 
				
			|||
# Envy24 chips with analog outs | 
				
			|||
set DAC 90% unmute | 
				
			|||
set DAC -12dB | 
				
			|||
set DAC,0 90% unmute | 
				
			|||
set DAC,0 -12dB | 
				
			|||
set DAC,1 90% unmute | 
				
			|||
set DAC,1 -12dB | 
				
			|||
# some notebooks use headphone instead of master | 
				
			|||
set Headphone 75% unmute | 
				
			|||
set Headphone -12dB | 
				
			|||
set Playback 100% unmute | 
				
			|||
# turn off digital switches | 
				
			|||
set "SB Live Analog/Digital Output Jack" off | 
				
			|||
set "Audigy Analog/Digital Output Jack" off | 
				
			|||
EOF | 
				
			|||
      echo "Storing default ALSA mixer settings:  /usr/sbin/alsactl store" | 
				
			|||
      /usr/sbin/alsactl store | 
				
			|||
    fi | 
				
			|||
  fi | 
				
			|||
} | 
				
			|||
 | 
				
			|||
# If udev or something else has loaded the ALSA modules, then | 
				
			|||
# simply load the mixer settings and make sure the OSS compat | 
				
			|||
# modules are loaded (if enabled): | 
				
			|||
if [ -d /proc/asound ]; then | 
				
			|||
  if [ -x /etc/rc.d/rc.alsa-oss ]; then | 
				
			|||
    sh /etc/rc.d/rc.alsa-oss | 
				
			|||
  fi | 
				
			|||
  load_alsa_mixer | 
				
			|||
else | 
				
			|||
  # If there are ALSA modules defined in /etc/modprobe.d/*, but | 
				
			|||
  # ALSA is not yet loaded, then load the modules now: | 
				
			|||
  DRIVERS=$(modprobe -c | grep -E "^[[:space:]]*alias[[:space:]]+snd-card-[[:digit:]]" | tr -s "[[:blank:]]" " " | cut -d " " -f 3) | 
				
			|||
  if [ ! "$DRIVERS" = "" ]; then | 
				
			|||
    echo "Loading ALSA kernel modules." | 
				
			|||
    for module in $DRIVERS; do | 
				
			|||
      modprobe $module | 
				
			|||
    done | 
				
			|||
  fi | 
				
			|||
  # If ALSA is now up, then load the mixer settings and OSS modules (if enabled): | 
				
			|||
  if [ -d /proc/asound ]; then | 
				
			|||
    if [ -x /etc/rc.d/rc.alsa-oss ]; then | 
				
			|||
      sh /etc/rc.d/rc.alsa-oss | 
				
			|||
    fi | 
				
			|||
    load_alsa_mixer | 
				
			|||
  fi | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
@ -0,0 +1,87 @@ | 
				
			|||
#!/bin/sh | 
				
			|||
# Load the mixer settings and OSS compatibility (if enabled) for ALSA. | 
				
			|||
# (the Advanced Linux Sound Architecture) | 
				
			|||
 | 
				
			|||
# A function to load the ALSA mixer settings: | 
				
			|||
load_alsa_mixer() { | 
				
			|||
  if [ -r /var/lib/alsa/asound.state ]; then | 
				
			|||
    echo "Loading ALSA mixer settings:  /usr/sbin/alsactl restore" | 
				
			|||
    /usr/sbin/alsactl restore | 
				
			|||
  else | 
				
			|||
    # It's possible a user might not want to set a default sound state. | 
				
			|||
    # In that case, do this:  touch /var/lib/alsa/no.asound.state | 
				
			|||
    if [ ! -r /var/lib/alsa/no.asound.state ]; then | 
				
			|||
      echo "Setting default ALSA mixer settings." | 
				
			|||
      # set default mixer volumes for ALSA | 
				
			|||
      # Taken from the alsaconf script. | 
				
			|||
      amixer -s -q <<EOF | 
				
			|||
set Master 75% unmute | 
				
			|||
set Master -12dB | 
				
			|||
set 'Master Mono' 75% unmute | 
				
			|||
set 'Master Mono' -12dB | 
				
			|||
set Front 75% unmute | 
				
			|||
set Front -12dB | 
				
			|||
set PCM 90% unmute | 
				
			|||
set PCM 0dB | 
				
			|||
mixer Synth 90% unmute | 
				
			|||
mixer Synth 0dB | 
				
			|||
mixer CD 90% unmute | 
				
			|||
mixer CD 0dB | 
				
			|||
# mute mic | 
				
			|||
set Mic 0% mute | 
				
			|||
# ESS 1969 chipset has 2 PCM channels | 
				
			|||
set PCM,1 90% unmute | 
				
			|||
set PCM,1 0dB | 
				
			|||
# Trident/YMFPCI/emu10k1 | 
				
			|||
set Wave 100% unmute | 
				
			|||
set Music 100% unmute | 
				
			|||
set AC97 100% unmute | 
				
			|||
# CS4237B chipset: | 
				
			|||
set 'Master Digital' 75% unmute | 
				
			|||
# Envy24 chips with analog outs | 
				
			|||
set DAC 90% unmute | 
				
			|||
set DAC -12dB | 
				
			|||
set DAC,0 90% unmute | 
				
			|||
set DAC,0 -12dB | 
				
			|||
set DAC,1 90% unmute | 
				
			|||
set DAC,1 -12dB | 
				
			|||
# some notebooks use headphone instead of master | 
				
			|||
set Headphone 75% unmute | 
				
			|||
set Headphone -12dB | 
				
			|||
set Playback 100% unmute | 
				
			|||
# turn off digital switches | 
				
			|||
set "SB Live Analog/Digital Output Jack" off | 
				
			|||
set "Audigy Analog/Digital Output Jack" off | 
				
			|||
EOF | 
				
			|||
      echo "Storing default ALSA mixer settings:  /usr/sbin/alsactl store" | 
				
			|||
      /usr/sbin/alsactl store | 
				
			|||
    fi | 
				
			|||
  fi | 
				
			|||
} | 
				
			|||
 | 
				
			|||
# If udev or something else has loaded the ALSA modules, then | 
				
			|||
# simply load the mixer settings and make sure the OSS compat | 
				
			|||
# modules are loaded (if enabled): | 
				
			|||
if [ -d /proc/asound ]; then | 
				
			|||
  if [ -x /etc/rc.d/rc.alsa-oss ]; then | 
				
			|||
    sh /etc/rc.d/rc.alsa-oss | 
				
			|||
  fi | 
				
			|||
  load_alsa_mixer | 
				
			|||
else | 
				
			|||
  # If there are ALSA modules defined in /etc/modprobe.d/*, but | 
				
			|||
  # ALSA is not yet loaded, then load the modules now: | 
				
			|||
  DRIVERS=$(modprobe -c | grep -E "^[[:space:]]*alias[[:space:]]+snd-card-[[:digit:]]" | tr -s "[[:blank:]]" " " | cut -d " " -f 3) | 
				
			|||
  if [ ! "$DRIVERS" = "" ]; then | 
				
			|||
    echo "Loading ALSA kernel modules." | 
				
			|||
    for module in $DRIVERS; do | 
				
			|||
      modprobe $module | 
				
			|||
    done | 
				
			|||
  fi | 
				
			|||
  # If ALSA is now up, then load the mixer settings and OSS modules (if enabled): | 
				
			|||
  if [ -d /proc/asound ]; then | 
				
			|||
    if [ -x /etc/rc.d/rc.alsa-oss ]; then | 
				
			|||
      sh /etc/rc.d/rc.alsa-oss | 
				
			|||
    fi | 
				
			|||
    load_alsa_mixer | 
				
			|||
  fi | 
				
			|||
fi | 
				
			|||
@ -0,0 +1,27 @@ | 
				
			|||
#!/bin/sh | 
				
			|||
# | 
				
			|||
# /etc/rc.d/rc.dhcpcd | 
				
			|||
# | 
				
			|||
# Start/stop the DHCP daemon. | 
				
			|||
# | 
				
			|||
# This script doesn't do anything other than starting dhcpcd for the specified interfaces (or all of them). For more functionality see rc.inet1. | 
				
			|||
 | 
				
			|||
IFACES="" | 
				
			|||
if [ -f /etc/default/dhcpcd ]; then | 
				
			|||
  . /etc/default/dhcpcd | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
case "$1" in | 
				
			|||
'start') | 
				
			|||
  shift | 
				
			|||
  echo "Starting dhcpcd..." | 
				
			|||
  dhcpcd -b ${@:-$IFACES} | 
				
			|||
  ;; | 
				
			|||
'stop') | 
				
			|||
  shift | 
				
			|||
  echo "Stopping dhcpcd..." | 
				
			|||
  dhcpcd -k ${@:-$IFACES} | 
				
			|||
  ;; | 
				
			|||
*) | 
				
			|||
  echo "Usage: $0 start|stop [interfaces]" | 
				
			|||
esac | 
				
			|||
@ -0,0 +1,37 @@ | 
				
			|||
#!/bin/sh | 
				
			|||
# Start/stop/restart dnsmasq (a small DNS/DHCP server): | 
				
			|||
 | 
				
			|||
# Start dnsmasq: | 
				
			|||
dnsmasq_start() { | 
				
			|||
  if [ -x /usr/sbin/dnsmasq ]; then | 
				
			|||
    echo "Starting dnsmasq:  /usr/sbin/dnsmasq" | 
				
			|||
    /usr/sbin/dnsmasq | 
				
			|||
  fi | 
				
			|||
} | 
				
			|||
 | 
				
			|||
# Stop dnsmasq: | 
				
			|||
dnsmasq_stop() { | 
				
			|||
  killall dnsmasq | 
				
			|||
} | 
				
			|||
 | 
				
			|||
# Restart dnsmasq: | 
				
			|||
dnsmasq_restart() { | 
				
			|||
  dnsmasq_stop | 
				
			|||
  sleep 1 | 
				
			|||
  dnsmasq_start | 
				
			|||
} | 
				
			|||
 | 
				
			|||
case "$1" in | 
				
			|||
'start') | 
				
			|||
  dnsmasq_start | 
				
			|||
  ;; | 
				
			|||
'stop') | 
				
			|||
  dnsmasq_stop | 
				
			|||
  ;; | 
				
			|||
'restart') | 
				
			|||
  dnsmasq_restart | 
				
			|||
  ;; | 
				
			|||
*) | 
				
			|||
  echo "usage rc.dnsmasq: start|stop|restart" | 
				
			|||
esac | 
				
			|||
 | 
				
			|||
@ -0,0 +1,36 @@ | 
				
			|||
#!/bin/sh | 
				
			|||
# Start/stop/restart dnsmasq (a small DNS/DHCP server): | 
				
			|||
 | 
				
			|||
# Start dnsmasq: | 
				
			|||
dnsmasq_start() { | 
				
			|||
  if [ -x /usr/sbin/dnsmasq ]; then | 
				
			|||
    echo "Starting dnsmasq:  /usr/sbin/dnsmasq" | 
				
			|||
    /usr/sbin/dnsmasq | 
				
			|||
  fi | 
				
			|||
} | 
				
			|||
 | 
				
			|||
# Stop dnsmasq: | 
				
			|||
dnsmasq_stop() { | 
				
			|||
  killall dnsmasq | 
				
			|||
} | 
				
			|||
 | 
				
			|||
# Restart dnsmasq: | 
				
			|||
dnsmasq_restart() { | 
				
			|||
  dnsmasq_stop | 
				
			|||
  sleep 1 | 
				
			|||
  dnsmasq_start | 
				
			|||
} | 
				
			|||
 | 
				
			|||
case "$1" in | 
				
			|||
'start') | 
				
			|||
  dnsmasq_start | 
				
			|||
  ;; | 
				
			|||
'stop') | 
				
			|||
  dnsmasq_stop | 
				
			|||
  ;; | 
				
			|||
'restart') | 
				
			|||
  dnsmasq_restart | 
				
			|||
  ;; | 
				
			|||
*) | 
				
			|||
  echo "usage rc.dnsmasq: start|stop|restart" | 
				
			|||
esac | 
				
			|||
@ -0,0 +1,76 @@ | 
				
			|||
#!/bin/sh | 
				
			|||
# | 
				
			|||
# /etc/rc.d/rc.psd | 
				
			|||
# | 
				
			|||
# Start/stop profile-sync-daemon. | 
				
			|||
# | 
				
			|||
# This script enables and disables profile-sync-daemon for selected users. | 
				
			|||
# You can either define users in the $USERS array, | 
				
			|||
#   or have this script scan for them and save them in $USERS_CACHE. | 
				
			|||
 | 
				
			|||
USERS="" | 
				
			|||
USERS_CACHE="/run/psd-users.cache" | 
				
			|||
if [ -f /etc/default/psd ]; then | 
				
			|||
  . /etc/default/psd | 
				
			|||
fi | 
				
			|||
 | 
				
			|||
scan_users() { | 
				
			|||
  rm -f "$USERS_CACHE" | 
				
			|||
 | 
				
			|||
  for user in $(getent passwd | cut -d: -f1); do | 
				
			|||
    group="$(getent passwd $user | cut -d: -f4)" | 
				
			|||
    home="$(getent passwd $user | cut -d: -f6)" | 
				
			|||
    shell="$(getent passwd $user | cut -d: -f7)" | 
				
			|||
    if [ "$group" != "0" -a "$home" -a "$home" != "/" -a "$(fgrep -x "$shell" /etc/shells)" ]; then | 
				
			|||
      config="$(su - $user -c 'echo $XDG_CONFIG_HOME')" | 
				
			|||
      [ ! "$config" ] && config="$home/.config" | 
				
			|||
      if [ -f "$config/psd/psd.conf" ]; then | 
				
			|||
        echo "$user" >> "$USERS_CACHE" | 
				
			|||
      fi | 
				
			|||
    fi | 
				
			|||
  done | 
				
			|||
} | 
				
			|||
 | 
				
			|||
get_users() { | 
				
			|||
  # If $USERS is empty, try to create it based on what users have an existing $XDG_CONFIG_HOME/psd/psd.conf | 
				
			|||
  if [ ! "$USERS" ]; then | 
				
			|||
    if [ ! -f "$USERS_CACHE" ]; then | 
				
			|||
      scan_users | 
				
			|||
    fi | 
				
			|||
    cat "$USERS_CACHE" | 
				
			|||
  else | 
				
			|||
    echo "$USERS" | 
				
			|||
  fi | 
				
			|||
} | 
				
			|||
 | 
				
			|||
start_psd() { | 
				
			|||
  if [ -x /usr/bin/psd ]; then | 
				
			|||
    echo "Starting/Resyncing Profile-sync-daemon..." | 
				
			|||
    for user in $(get_users); do | 
				
			|||
      su - $user -c 'psd resync' > /dev/null | 
				
			|||
    done & | 
				
			|||
  fi | 
				
			|||
} | 
				
			|||
 | 
				
			|||
stop_psd() { | 
				
			|||
  if [ -x /usr/bin/psd ]; then | 
				
			|||
    echo "Stoppping Profile-sync-daemon..." | 
				
			|||
    for user in $(get_users); do | 
				
			|||
      su - $user -c 'psd unsync' > /dev/null | 
				
			|||
    done | 
				
			|||
  fi | 
				
			|||
} | 
				
			|||
 | 
				
			|||
case "$1" in | 
				
			|||
'start') | 
				
			|||
  start_psd | 
				
			|||
  ;; | 
				
			|||
'stop') | 
				
			|||
  stop_psd | 
				
			|||
  ;; | 
				
			|||
'scan_users') | 
				
			|||
  scan_users | 
				
			|||
  ;; | 
				
			|||
*) | 
				
			|||
  echo "Usage: $0 start|stop|scan_users" | 
				
			|||
esac | 
				
			|||
@ -0,0 +1 @@ | 
				
			|||
nameserver 127.0.0.1 | 
				
			|||
@ -0,0 +1,90 @@ | 
				
			|||
# A list of the packages I usually remove from the base install. | 
				
			|||
# The commented entries differ per installation. | 
				
			|||
 | 
				
			|||
# Entire package groups | 
				
			|||
#d | 
				
			|||
e | 
				
			|||
f | 
				
			|||
#k | 
				
			|||
kde | 
				
			|||
kdei | 
				
			|||
t | 
				
			|||
y | 
				
			|||
 | 
				
			|||
# a | 
				
			|||
#glibc-solibs | 
				
			|||
#openssl-solibs | 
				
			|||
#elilo | 
				
			|||
#lilo | 
				
			|||
#syslinux | 
				
			|||
#grub | 
				
			|||
aaa_elflibs | 
				
			|||
elvis | 
				
			|||
getty-ps | 
				
			|||
lha | 
				
			|||
unarj | 
				
			|||
 | 
				
			|||
# ap | 
				
			|||
amp | 
				
			|||
pamixer | 
				
			|||
sox | 
				
			|||
 | 
				
			|||
# d | 
				
			|||
gcc-go | 
				
			|||
gcc-java | 
				
			|||
 | 
				
			|||
# l | 
				
			|||
alsa-plugins | 
				
			|||
pulseaudio | 
				
			|||
seamonkey-solibs | 
				
			|||
 | 
				
			|||
# n | 
				
			|||
ModemManager | 
				
			|||
NetworkManager | 
				
			|||
mobile-broadband-provider-info | 
				
			|||
trn | 
				
			|||
 | 
				
			|||
# x | 
				
			|||
font-bh-ttf | 
				
			|||
font-bh-type1 | 
				
			|||
ttf-indic-fonts | 
				
			|||
 | 
				
			|||
# xap | 
				
			|||
MPlayer | 
				
			|||
network-manager-applet | 
				
			|||
pavucontrol | 
				
			|||
rxvt | 
				
			|||
seamonkey | 
				
			|||
xfractint | 
				
			|||
xgames | 
				
			|||
xv | 
				
			|||
 | 
				
			|||
# --- Rationales: | 
				
			|||
# | 
				
			|||
# aaa_elflibs: A shitty "fix" for a non-existing problem. Includes old libraries which might be vulnerable. Old software should just be rebuilt, and I can resolve library dependencies for myself, tyvm. | 
				
			|||
# MPlayer, sox: Need a rebuild to work without PulseAudio, and I don't use them anyway. | 
				
			|||
# seamonkey, seamonkey-solibs: No particular reason, I just don't use it, and it's big. | 
				
			|||
# ttf-indic-fonts: Winetricks doesn't like it. | 
				
			|||
# getty-ps, lha, unarj, amp, trn, font-bh-ttf, font-bh-type1, xfractint, xgames, xv: Blacklisted by FreeSlack, and I don't need it. | 
				
			|||
# | 
				
			|||
# -- Replaced: | 
				
			|||
# pulseaudio, alsa-plugins, pavucontrol, pamixer: ALSA | 
				
			|||
# NetworkManager, ModemManager, mobile-broadband-provider-info, network-manager-applet: dhcpcd/wpa_supplicant | 
				
			|||
# elvis: vim | 
				
			|||
# rxvt: rxvt-unicode | 
				
			|||
# gcc-go: go (They actually conflict) | 
				
			|||
# gcc-java: icedtea (Needs gcc-java to bootstrap) | 
				
			|||
# | 
				
			|||
# -- Optional: | 
				
			|||
# elilo, lilo, syslinux, grub: Only one bootloader is used. | 
				
			|||
# k, d: Only needed if you need to compile programs. | 
				
			|||
# openssl-solibs: Useless if n/openssl is installed. | 
				
			|||
# glibc-solibs: Useless if l/glibc is installed. | 
				
			|||
 | 
				
			|||
# Custom packages | 
				
			|||
[0-9]+rocket | 
				
			|||
.*-astro | 
				
			|||
convert32-.* | 
				
			|||
 | 
				
			|||
# Force using the version in extra/ | 
				
			|||
#llvm-3.8.0-x86_64-2 | 
				
			|||
@ -0,0 +1,153 @@ | 
				
			|||
# | 
				
			|||
# slackpkg.conf - Configuration for SlackPkg | 
				
			|||
# v2.8 | 
				
			|||
# | 
				
			|||
 | 
				
			|||
# | 
				
			|||
# SlackPkg - An Automated packaging tool for Slackware Linux | 
				
			|||
# Copyright (C) 2003-2011 Roberto F. Batista, Evaldo Gardenali | 
				
			|||
# | 
				
			|||
# This program is free software; you can redistribute it and/or modify | 
				
			|||
# it under the terms of the GNU General Public License as published by | 
				
			|||
# the Free Software Foundation; either version 2 of the License, or | 
				
			|||
# (at your option) any later version. | 
				
			|||
# | 
				
			|||
# This program is distributed in the hope that it will be useful, | 
				
			|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | 
				
			|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
				
			|||
# GNU General Public License for more details. | 
				
			|||
# | 
				
			|||
# You should have received a copy of the GNU General Public License | 
				
			|||
# along with this program; if not, write to the Free Software | 
				
			|||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA | 
				
			|||
# | 
				
			|||
# Project Page: http://slackpkg.org/ | 
				
			|||
# Roberto F. Batista (aka PiterPunk) piterpunk@slackware.com | 
				
			|||
# Evaldo Gardenali (aka UdontKnow) evaldogardenali@fasternet.com.br | 
				
			|||
# | 
				
			|||
 | 
				
			|||
# For configuration options that have only two states, possible values are | 
				
			|||
# either "on" or "off" | 
				
			|||
 | 
				
			|||
# Remember, the only official Slackware ports are x86, s390 and arm, and | 
				
			|||
# slackpkg developers don't have s390 boxes for testing.  If you are | 
				
			|||
# testing/using other architectures and have suggestions or patches,  | 
				
			|||
# please let me know (piterpunk@slackware.com) | 
				
			|||
# | 
				
			|||
# Select the architecture of your system. Valid values are:  | 
				
			|||
#	i#86 (where # is 3, 4, 5 or 6) | 
				
			|||
#	x86_64 | 
				
			|||
#	s390 | 
				
			|||
#	arm* (* can be v4, v5tejl, and other ARM versions)  | 
				
			|||
#	powerpc | 
				
			|||
# | 
				
			|||
# The line is commented because slackpkg will try to find your  | 
				
			|||
# architecture automagically.  If you want to override what slackpkg | 
				
			|||
# finds, put the value after the = and uncomment this line | 
				
			|||
#ARCH= | 
				
			|||
 | 
				
			|||
# The default PKGMAIN is "slackware", but some derived distros use other | 
				
			|||
# names as the main directory.  PKGMAIN is the place with the slackware | 
				
			|||
# package series (a, ap, n, ... ). | 
				
			|||
# | 
				
			|||
# Usually slackpkg can automagically discover this variable.  If you want | 
				
			|||
# to override the discovered variable, then uncomment this line and change | 
				
			|||
# it to reflect the correct value of PKGMAIN | 
				
			|||
#PKGMAIN=slackware | 
				
			|||
 | 
				
			|||
# Slackware packages are signed by project key.  Slackpkg uses this key | 
				
			|||
# to check if the packages downloaded are valid, so remember to set  | 
				
			|||
# CHECKGPG to "on".  | 
				
			|||
#  | 
				
			|||
# Usually slackpkg can automagically discover this variable. If you want | 
				
			|||
# to override the discovered variable, then uncomment this line and edit | 
				
			|||
# as needed | 
				
			|||
#SLACKKEY="Slackware Linux Project <security@slackware.com>" | 
				
			|||
 | 
				
			|||
# Downloaded files will be in directory below: | 
				
			|||
TEMP=/var/cache/packages | 
				
			|||
 | 
				
			|||
# Package lists, file lists, and others will be at WORKDIR: | 
				
			|||
WORKDIR=/var/lib/slackpkg | 
				
			|||
 | 
				
			|||
# Special options for wget (default is WGETFLAGS="--passive-ftp") | 
				
			|||
WGETFLAGS="--passive-ftp" | 
				
			|||
 | 
				
			|||
# If DELALL is "on", all downloaded files will be removed after install. | 
				
			|||
DELALL=on | 
				
			|||
 | 
				
			|||
# If CHECKMD5 is "on", the system will check the md5sums of all packages before | 
				
			|||
# install/upgrade/reinstall is performed. | 
				
			|||
CHECKMD5=on | 
				
			|||
 | 
				
			|||
# If CHECKGPG is "on", the system will verify the GPG signature of each package | 
				
			|||
# before install/upgrade/reinstall is performed. | 
				
			|||
CHECKGPG=on | 
				
			|||
 | 
				
			|||
# If CHECKSIZE is "on", the system will check if we have sufficient disk | 
				
			|||
# space to install selected package. This make upgrade/install safer, but slow | 
				
			|||
# upgrade/install process. | 
				
			|||
CHECKSIZE=off | 
				
			|||
 | 
				
			|||
# PRIORITY sets the download priority. slackpkg will try to found the | 
				
			|||
# package first in the first value, then the second one, through all | 
				
			|||
# values in list. | 
				
			|||
#  | 
				
			|||
# Default value: patches %PKGMAIN extra pasture testing | 
				
			|||
PRIORITY=( patches %PKGMAIN extra pasture testing ) | 
				
			|||
 | 
				
			|||
# Enables (on) or disables (off) slackpkg's post-installation features, such | 
				
			|||
# as checking for new (*.new) configuration files and new kernel images, and | 
				
			|||
# prompts you for what it should do.  Default=on | 
				
			|||
POSTINST=on | 
				
			|||
 | 
				
			|||
# Post-installation features, by default, search all of /etc for .new files. | 
				
			|||
# This is the safe option: with it, you won't have any unmerged .new files | 
				
			|||
# to cause problems.  Even so, some people prefer that only the .new files  | 
				
			|||
# installed by the current slackpkg session be checked. | 
				
			|||
# If this is your case, change ONLY_NEW_DOTNEW to "on". | 
				
			|||
# Default=off | 
				
			|||
ONLY_NEW_DOTNEW=off | 
				
			|||
 | 
				
			|||
# The ONOFF variable sets the initial behavior of the dialog interface. | 
				
			|||
# If you set this to "on" then all packages will be selected by default. | 
				
			|||
# If you prefer the opposite option (all unchecked), then set this to "off". | 
				
			|||
ONOFF=on | 
				
			|||
 | 
				
			|||
# If this variable is set to "on", all files will be downloaded before the | 
				
			|||
# requested operation (install or upgrade) is performed.   If set to "off", | 
				
			|||
# then the files will be downloaded and the operation (install/upgrade) | 
				
			|||
# performed one by one.  Default=on | 
				
			|||
DOWNLOAD_ALL=on | 
				
			|||
 | 
				
			|||
# Enables (on) or disables (off) the dialog interface in slackpkg.  Default=on | 
				
			|||
DIALOG=off | 
				
			|||
 | 
				
			|||
# Enables (on) or disables (off) the non-interactive mode.  If set to "on", | 
				
			|||
# slackpkg will run without asking the user anything, and answer all questions | 
				
			|||
# with DEFAULT_ANSWER.  If you do any upgrades using this mode, you'll need to | 
				
			|||
# run "slackpkg new-config" later to find and merge any .new files. | 
				
			|||
BATCH=off | 
				
			|||
 | 
				
			|||
# Default answer to slackpkg questions. Can be "y" or "n". | 
				
			|||
DEFAULT_ANSWER=n | 
				
			|||
 | 
				
			|||
# Slackpkg allows a template to "include" the packages specified in another | 
				
			|||
# template.  This option enables (on) or disables (off) the parsing of | 
				
			|||
# any "#include" directives in template files.  Default=on | 
				
			|||
USE_INCLUDES=on | 
				
			|||
 | 
				
			|||
# Enables a spinning bar as visual feedback when slackpkg is making its | 
				
			|||
# internal lists and some other operations.  Default=on | 
				
			|||
SPINNING=on | 
				
			|||
 | 
				
			|||
# Max number of characters that "dialog" command can handle. | 
				
			|||
# If unset, this variable will be 19500 (the number that works on | 
				
			|||
# Slackware 10.2) | 
				
			|||
DIALOG_MAXARGS=139000 | 
				
			|||
 | 
				
			|||
# | 
				
			|||
# The MIRROR is set from /etc/slackpkg/mirrors | 
				
			|||
# You only need to uncomment the selected mirror.  | 
				
			|||
# Uncomment one mirror only. | 
				
			|||
# | 
				
			|||
@ -0,0 +1,153 @@ | 
				
			|||
# | 
				
			|||
# slackpkg.conf - Configuration for SlackPkg | 
				
			|||
# v2.8 | 
				
			|||
# | 
				
			|||
 | 
				
			|||
# | 
				
			|||
# SlackPkg - An Automated packaging tool for Slackware Linux | 
				
			|||
# Copyright (C) 2003-2011 Roberto F. Batista, Evaldo Gardenali | 
				
			|||
# | 
				
			|||
# This program is free software; you can redistribute it and/or modify | 
				
			|||
# it under the terms of the GNU General Public License as published by | 
				
			|||
# the Free Software Foundation; either version 2 of the License, or | 
				
			|||
# (at your option) any later version. | 
				
			|||
# | 
				
			|||
# This program is distributed in the hope that it will be useful, | 
				
			|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | 
				
			|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
				
			|||
# GNU General Public License for more details. | 
				
			|||
# | 
				
			|||
# You should have received a copy of the GNU General Public License | 
				
			|||
# along with this program; if not, write to the Free Software | 
				
			|||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA | 
				
			|||
# | 
				
			|||
# Project Page: http://slackpkg.org/ | 
				
			|||
# Roberto F. Batista (aka PiterPunk) piterpunk@slackware.com | 
				
			|||
# Evaldo Gardenali (aka UdontKnow) evaldogardenali@fasternet.com.br | 
				
			|||
# | 
				
			|||
 | 
				
			|||
# For configuration options that have only two states, possible values are | 
				
			|||
# either "on" or "off" | 
				
			|||
 | 
				
			|||
# Remember, the only official Slackware ports are x86, s390 and arm, and | 
				
			|||
# slackpkg developers don't have s390 boxes for testing.  If you are | 
				
			|||
# testing/using other architectures and have suggestions or patches,  | 
				
			|||
# please let me know (piterpunk@slackware.com) | 
				
			|||
# | 
				
			|||
# Select the architecture of your system. Valid values are:  | 
				
			|||
#	i#86 (where # is 3, 4, 5 or 6) | 
				
			|||
#	x86_64 | 
				
			|||
#	s390 | 
				
			|||
#	arm* (* can be v4, v5tejl, and other ARM versions)  | 
				
			|||
#	powerpc | 
				
			|||
# | 
				
			|||
# The line is commented because slackpkg will try to find your  | 
				
			|||
# architecture automagically.  If you want to override what slackpkg | 
				
			|||
# finds, put the value after the = and uncomment this line | 
				
			|||
#ARCH= | 
				
			|||
 | 
				
			|||
# The default PKGMAIN is "slackware", but some derived distros use other | 
				
			|||
# names as the main directory.  PKGMAIN is the place with the slackware | 
				
			|||
# package series (a, ap, n, ... ). | 
				
			|||
# | 
				
			|||
# Usually slackpkg can automagically discover this variable.  If you want | 
				
			|||
# to override the discovered variable, then uncomment this line and change | 
				
			|||
# it to reflect the correct value of PKGMAIN | 
				
			|||
#PKGMAIN=slackware | 
				
			|||
 | 
				
			|||
# Slackware packages are signed by project key.  Slackpkg uses this key | 
				
			|||
# to check if the packages downloaded are valid, so remember to set  | 
				
			|||
# CHECKGPG to "on".  | 
				
			|||
#  | 
				
			|||
# Usually slackpkg can automagically discover this variable. If you want | 
				
			|||
# to override the discovered variable, then uncomment this line and edit | 
				
			|||
# as needed | 
				
			|||
#SLACKKEY="Slackware Linux Project <security@slackware.com>" | 
				
			|||
 | 
				
			|||
# Downloaded files will be in directory below: | 
				
			|||
TEMP=/var/cache/packages | 
				
			|||
 | 
				
			|||
# Package lists, file lists, and others will be at WORKDIR: | 
				
			|||
WORKDIR=/var/lib/slackpkg | 
				
			|||
 | 
				
			|||
# Special options for wget (default is WGETFLAGS="--passive-ftp") | 
				
			|||
WGETFLAGS="--passive-ftp" | 
				
			|||
 | 
				
			|||
# If DELALL is "on", all downloaded files will be removed after install. | 
				
			|||
DELALL=on | 
				
			|||
 | 
				
			|||
# If CHECKMD5 is "on", the system will check the md5sums of all packages before | 
				
			|||
# install/upgrade/reinstall is performed. | 
				
			|||
CHECKMD5=on | 
				
			|||
 | 
				
			|||
# If CHECKGPG is "on", the system will verify the GPG signature of each package | 
				
			|||
# before install/upgrade/reinstall is performed. | 
				
			|||
CHECKGPG=on | 
				
			|||
 | 
				
			|||
# If CHECKSIZE is "on", the system will check if we have sufficient disk | 
				
			|||
# space to install selected package. This make upgrade/install safer, but slow | 
				
			|||
# upgrade/install process. | 
				
			|||
CHECKSIZE=off | 
				
			|||
 | 
				
			|||
# PRIORITY sets the download priority. slackpkg will try to found the | 
				
			|||
# package first in the first value, then the second one, through all | 
				
			|||
# values in list. | 
				
			|||
#  | 
				
			|||
# Default value: patches %PKGMAIN extra pasture testing | 
				
			|||
PRIORITY=( patches %PKGMAIN extra pasture testing ) | 
				
			|||
 | 
				
			|||
# Enables (on) or disables (off) slackpkg's post-installation features, such | 
				
			|||
# as checking for new (*.new) configuration files and new kernel images, and | 
				
			|||
# prompts you for what it should do.  Default=on | 
				
			|||
POSTINST=on | 
				
			|||
 | 
				
			|||
# Post-installation features, by default, search all of /etc for .new files. | 
				
			|||
# This is the safe option: with it, you won't have any unmerged .new files | 
				
			|||
# to cause problems.  Even so, some people prefer that only the .new files  | 
				
			|||
# installed by the current slackpkg session be checked. | 
				
			|||
# If this is your case, change ONLY_NEW_DOTNEW to "on". | 
				
			|||
# Default=off | 
				
			|||
ONLY_NEW_DOTNEW=off | 
				
			|||
 | 
				
			|||
# The ONOFF variable sets the initial behavior of the dialog interface. | 
				
			|||
# If you set this to "on" then all packages will be selected by default. | 
				
			|||
# If you prefer the opposite option (all unchecked), then set this to "off". | 
				
			|||
ONOFF=on | 
				
			|||
 | 
				
			|||
# If this variable is set to "on", all files will be downloaded before the | 
				
			|||
# requested operation (install or upgrade) is performed.   If set to "off", | 
				
			|||
# then the files will be downloaded and the operation (install/upgrade) | 
				
			|||
# performed one by one.  Default=on | 
				
			|||
DOWNLOAD_ALL=on | 
				
			|||
 | 
				
			|||
# Enables (on) or disables (off) the dialog interface in slackpkg.  Default=on | 
				
			|||
DIALOG=on | 
				
			|||
 | 
				
			|||
# Enables (on) or disables (off) the non-interactive mode.  If set to "on", | 
				
			|||
# slackpkg will run without asking the user anything, and answer all questions | 
				
			|||
# with DEFAULT_ANSWER.  If you do any upgrades using this mode, you'll need to | 
				
			|||
# run "slackpkg new-config" later to find and merge any .new files. | 
				
			|||
BATCH=off | 
				
			|||
 | 
				
			|||
# Default answer to slackpkg questions. Can be "y" or "n". | 
				
			|||
DEFAULT_ANSWER=n | 
				
			|||
 | 
				
			|||
# Slackpkg allows a template to "include" the packages specified in another | 
				
			|||
# template.  This option enables (on) or disables (off) the parsing of | 
				
			|||
# any "#include" directives in template files.  Default=on | 
				
			|||
USE_INCLUDES=on | 
				
			|||
 | 
				
			|||
# Enables a spinning bar as visual feedback when slackpkg is making its | 
				
			|||
# internal lists and some other operations.  Default=on | 
				
			|||
SPINNING=on | 
				
			|||
 | 
				
			|||
# Max number of characters that "dialog" command can handle. | 
				
			|||
# If unset, this variable will be 19500 (the number that works on | 
				
			|||
# Slackware 10.2) | 
				
			|||
DIALOG_MAXARGS=139000 | 
				
			|||
 | 
				
			|||
# | 
				
			|||
# The MIRROR is set from /etc/slackpkg/mirrors | 
				
			|||
# You only need to uncomment the selected mirror.  | 
				
			|||
# Uncomment one mirror only. | 
				
			|||
# | 
				
			|||
@ -0,0 +1 @@ | 
				
			|||
%wheel ALL=(ALL) ALL | 
				
			|||
@ -0,0 +1,2 @@ | 
				
			|||
vm.swappiness=1 | 
				
			|||
vm.vfs_cache_pressure=50 | 
				
			|||
@ -0,0 +1,4 @@ | 
				
			|||
# set scheduler for non-rotating disks | 
				
			|||
ACTION=="add|change", KERNEL=="sd[a-z]|mmcblk[0-9]*|nvme[0-9]*", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="mq-deadline" | 
				
			|||
# set scheduler for rotating disks | 
				
			|||
ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="1", ATTR{queue/scheduler}="bfq" | 
				
			|||
@ -0,0 +1,22 @@ | 
				
			|||
# Oneplus 2 | 
				
			|||
## System | 
				
			|||
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4ee7", MODE="0660", GROUP="plugdev" | 
				
			|||
## Fastboot | 
				
			|||
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="d00d", MODE="0660", GROUP="plugdev" | 
				
			|||
## ADB | 
				
			|||
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="d001", MODE="0660", GROUP="plugdev" | 
				
			|||
 | 
				
			|||
# Adafruit Trinket | 
				
			|||
SUBSYSTEM=="usb", ATTR{idVendor}=="1781", ATTR{idProduct}=="0c9f", MODE="0660", GROUP="plugdev" | 
				
			|||
 | 
				
			|||
# Arduino Yun | 
				
			|||
SUBSYSTEM=="usb", ATTR{idVendor}=="2341", ATTR{idProduct}=="8041", MODE="0660", GROUP="plugdev" | 
				
			|||
 | 
				
			|||
# Arduino Uno | 
				
			|||
SUBSYSTEM=="usb", ATTR{idVendor}=="2341", ATTR{idProduct}=="0043", MODE="0660", GROUP="plugdev" | 
				
			|||
 | 
				
			|||
# TI-84+ CE-T | 
				
			|||
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="e008", MODE="0660", GROUP="plugdev" | 
				
			|||
 | 
				
			|||
# PICkit2 | 
				
			|||
SUBSYSTEM=="usb", ATTR{idVendor}=="04d8", ATTR{idProduct}=="0033", MODE="0660", GROUP="plugdev" | 
				
			|||
@ -0,0 +1,3 @@ | 
				
			|||
ctrl_interface=/var/run/wpa_supplicant | 
				
			|||
ctrl_interface_group=netdev | 
				
			|||
update_config=1 | 
				
			|||
@ -0,0 +1,2 @@ | 
				
			|||
ctrl_interface=/var/run/wpa_supplicant | 
				
			|||
ctrl_interface_group=root | 
				
			|||
@ -0,0 +1,32 @@ | 
				
			|||
eval _$(typeset -f checkchangelog) | 
				
			|||
 | 
				
			|||
checkchangelog() { | 
				
			|||
	if ! [ -e ${ROOT}/${WORKDIR}/CHECKSUMS.md5.asc ]; then | 
				
			|||
		touch ${ROOT}/${WORKDIR}/CHECKSUMS.md5.asc | 
				
			|||
	fi | 
				
			|||
 | 
				
			|||
	# First we will download CHECKSUMS.md5.asc since it is a very small | 
				
			|||
	# file and if it has not changed, we can know that the ChangeLog | 
				
			|||
	# has not changed either. If it _has_ changed, we'll need to pull | 
				
			|||
	# the ChangeLog to check that as well. | 
				
			|||
	echo -e "\tDownloading..." | 
				
			|||
	getfile ${SOURCE}CHECKSUMS.md5.asc $TMPDIR/CHECKSUMS.md5.asc | 
				
			|||
	if ! grep -q "PGP" $TMPDIR/CHECKSUMS.md5.asc ; then | 
				
			|||
		echo -e "\ | 
				
			|||
\nError downloading from $SOURCE.\n\ | 
				
			|||
Please check your mirror and try again." | 
				
			|||
		cleanup | 
				
			|||
	fi | 
				
			|||
	if diff --brief ${ROOT}/${WORKDIR}/CHECKSUMS.md5.asc $TMPDIR/CHECKSUMS.md5.asc ; then | 
				
			|||
		# Before returning with the result that these signatures (and | 
				
			|||
		# therefore the ChangeLog) are the same, we need to copy the | 
				
			|||
		# ChangeLog into ${TMPDIR} in case the user decides to | 
				
			|||
		# "download all other files": | 
				
			|||
		cp ${ROOT}/${WORKDIR}/ChangeLog.txt $TMPDIR/ChangeLog.txt | 
				
			|||
		return 0 | 
				
			|||
	fi | 
				
			|||
	# CHECKSUMS.md5.asc was different, so we'll go on to download and test | 
				
			|||
	# the full ChangeLog.txt. | 
				
			|||
 | 
				
			|||
	_checkchangelog "$@" | 
				
			|||
} | 
				
			|||
@ -0,0 +1,96 @@ | 
				
			|||
looknew() { | 
				
			|||
	# with ONLY_NEW_DOTNEW set, slackpkg will search only for | 
				
			|||
	# .new files installed in actual slackpkg's execution | 
				
			|||
	if [ "$ONLY_NEW_DOTNEW" = "on" ]; then | 
				
			|||
		ONLY_NEW_DOTNEW="-cnewer $TMPDIR/timestamp" | 
				
			|||
	else | 
				
			|||
		ONLY_NEW_DOTNEW="" | 
				
			|||
	fi | 
				
			|||
 | 
				
			|||
	echo -e "\nSearching for NEW configuration files" | 
				
			|||
	FILES="" | 
				
			|||
 | 
				
			|||
	find /var/log/packages -maxdepth 1 -type f ${ONLY_NEW_DOTNEW} | xargs sed -n -e '/^FILE LIST:$/,/^$/p' | fgrep -xv 'FILE LIST:' | sort | uniq > $TMPDIR/allfiles | 
				
			|||
 | 
				
			|||
	local IFS=$'\n' | 
				
			|||
	for f in $(grep '\.new$' $TMPDIR/allfiles | sed -e 's/\.new$//'); do | 
				
			|||
		x=$f.new | 
				
			|||
		if [ -f "/$f" -a -f "/$x" ]; then | 
				
			|||
			if ! fgrep -x "$f" $TMPDIR/allfiles 1> /dev/null 2>&1; then | 
				
			|||
				FILES+="/$x | 
				
			|||
" | 
				
			|||
			fi | 
				
			|||
		fi | 
				
			|||
	done | 
				
			|||
 | 
				
			|||
	if [ "$FILES" != "" ]; then | 
				
			|||
		echo -e "\n\ | 
				
			|||
Some packages had new configuration files installed. | 
				
			|||
You have four choices: | 
				
			|||
 | 
				
			|||
	(K)eep the old files and consider .new files later | 
				
			|||
 | 
				
			|||
	(O)verwrite all old files with the new ones. The | 
				
			|||
	   old files will be stored with the suffix .orig | 
				
			|||
 | 
				
			|||
	(R)emove all .new files | 
				
			|||
 | 
				
			|||
	(P)rompt K, O, R selection for every single file | 
				
			|||
	 | 
				
			|||
What do you want (K/O/R/P)?" | 
				
			|||
		answer	 | 
				
			|||
		case $ANSWER in | 
				
			|||
			K|k) | 
				
			|||
				break | 
				
			|||
			;; | 
				
			|||
			O|o) | 
				
			|||
				for i in $FILES; do | 
				
			|||
					overold $i | 
				
			|||
				done | 
				
			|||
				break | 
				
			|||
			;; | 
				
			|||
			R|r) | 
				
			|||
				for i in $FILES; do | 
				
			|||
					removeold $i | 
				
			|||
				done | 
				
			|||
				break | 
				
			|||
			;; | 
				
			|||
			P|p) | 
				
			|||
				echo "Select what you want file-by-file" | 
				
			|||
				for i in $FILES; do | 
				
			|||
					GOEX=0 | 
				
			|||
					while [ $GOEX -eq 0 ]; do | 
				
			|||
						echo | 
				
			|||
						showmenu $i "(K)eep" "(O)verwrite" "(R)emove" "(D)iff" "(M)erge" | 
				
			|||
						read ANSWER | 
				
			|||
						case $ANSWER in | 
				
			|||
							O|o) | 
				
			|||
								overold $i | 
				
			|||
								GOEX=1 | 
				
			|||
							;; | 
				
			|||
							R|r) | 
				
			|||
								removeold $i | 
				
			|||
								GOEX=1 | 
				
			|||
							;; | 
				
			|||
							D|d) | 
				
			|||
								showdiff $1 | 
				
			|||
							;; | 
				
			|||
							M|m) | 
				
			|||
								mergenew $1 | 
				
			|||
							;; | 
				
			|||
							K|k|*) | 
				
			|||
								GOEX=1 | 
				
			|||
							;; | 
				
			|||
						esac | 
				
			|||
					done | 
				
			|||
				done | 
				
			|||
				break | 
				
			|||
			;; | 
				
			|||
			*) | 
				
			|||
				echo "OK! Your choice is nothing! slackpkg will Keep the old files for you to deal with later" | 
				
			|||
			;; | 
				
			|||
		esac | 
				
			|||
	else | 
				
			|||
		echo -e "\t\tNo .new files found." | 
				
			|||
	fi | 
				
			|||
} | 
				
			|||
@ -0,0 +1,114 @@ | 
				
			|||
" An example for a vimrc file. | 
				
			|||
" | 
				
			|||
" Maintainer:	Bram Moolenaar <Bram@vim.org> | 
				
			|||
" Last change:	2016 Apr 05 | 
				
			|||
" | 
				
			|||
" To use it, copy it to | 
				
			|||
"     for Unix and OS/2:  ~/.vimrc | 
				
			|||
"	      for Amiga:  s:.vimrc | 
				
			|||
"  for MS-DOS and Win32:  $VIM\_vimrc | 
				
			|||
"	    for OpenVMS:  sys$login:.vimrc | 
				
			|||
 | 
				
			|||
" When started as "evim", evim.vim will already have done these settings. | 
				
			|||
if v:progname =~? "evim" | 
				
			|||
  finish | 
				
			|||
endif | 
				
			|||
 | 
				
			|||
" Use Vim settings, rather than Vi settings (much better!). | 
				
			|||
" This must be first, because it changes other options as a side effect. | 
				
			|||
set nocompatible | 
				
			|||
 | 
				
			|||
" allow backspacing over everything in insert mode | 
				
			|||
set backspace=indent,eol,start | 
				
			|||
 | 
				
			|||
if has("vms") | 
				
			|||
  set nobackup		" do not keep a backup file, use versions instead | 
				
			|||
endif | 
				
			|||
set history=50		" keep 50 lines of command line history | 
				
			|||
set ruler		" show the cursor position all the time | 
				
			|||
set showcmd		" display incomplete commands | 
				
			|||
set incsearch		" do incremental searching | 
				
			|||
 | 
				
			|||
" For Win32 GUI: remove 't' flag from 'guioptions': no tearoff menu entries | 
				
			|||
" let &guioptions = substitute(&guioptions, "t", "", "g") | 
				
			|||
 | 
				
			|||
" Don't use Ex mode, use Q for formatting | 
				
			|||
map Q gq | 
				
			|||
 | 
				
			|||
" CTRL-U in insert mode deletes a lot.  Use CTRL-G u to first break undo, | 
				
			|||
" so that you can undo CTRL-U after inserting a line break. | 
				
			|||
inoremap <C-U> <C-G>u<C-U> | 
				
			|||
 | 
				
			|||
" In many terminal emulators the mouse works just fine, thus enable it. | 
				
			|||
if has('mouse') | 
				
			|||
  set mouse=a | 
				
			|||
endif | 
				
			|||
 | 
				
			|||
" Switch syntax highlighting on when the terminal has colors or when using the | 
				
			|||
" GUI (which always has colors). | 
				
			|||
if &t_Co > 2 || has("gui_running") | 
				
			|||
  syntax on | 
				
			|||
 | 
				
			|||
  " Also switch on highlighting the last used search pattern. | 
				
			|||
  set hlsearch | 
				
			|||
 | 
				
			|||
  " I like highlighting strings inside C comments. | 
				
			|||
  let c_comment_strings=1 | 
				
			|||
endif | 
				
			|||
 | 
				
			|||
" Only do this part when compiled with support for autocommands. | 
				
			|||
if has("autocmd") | 
				
			|||
 | 
				
			|||
  " Enable file type detection. | 
				
			|||
  " Use the default filetype settings, so that mail gets 'tw' set to 72, | 
				
			|||
  " 'cindent' is on in C files, etc. | 
				
			|||
  " Also load indent files, to automatically do language-dependent indenting. | 
				
			|||
  filetype plugin indent on | 
				
			|||
 | 
				
			|||
  " Put these in an autocmd group, so that we can delete them easily. | 
				
			|||
  augroup vimrcEx | 
				
			|||
  au! | 
				
			|||
 | 
				
			|||
  " For all text files set 'textwidth' to 78 characters. | 
				
			|||
  autocmd FileType text setlocal textwidth=78 | 
				
			|||
 | 
				
			|||
  " When editing a file, always jump to the last known cursor position. | 
				
			|||
  " Don't do it when the position is invalid or when inside an event handler | 
				
			|||
  " (happens when dropping a file on gvim). | 
				
			|||
  autocmd BufReadPost * | 
				
			|||
    \ if line("'\"") >= 1 && line("'\"") <= line("$") | | 
				
			|||
    \   exe "normal! g`\"" | | 
				
			|||
    \ endif | 
				
			|||
 | 
				
			|||
  augroup END | 
				
			|||
 | 
				
			|||
else | 
				
			|||
 | 
				
			|||
  set autoindent		" always set autoindenting on | 
				
			|||
 | 
				
			|||
endif " has("autocmd") | 
				
			|||
 | 
				
			|||
" Make vim work with the 'crontab -e' command | 
				
			|||
set backupskip+=/var/spool/cron/* | 
				
			|||
 | 
				
			|||
" Convenient command to see the difference between the current buffer and the | 
				
			|||
" file it was loaded from, thus the changes you made. | 
				
			|||
" Only define it when not defined already. | 
				
			|||
if !exists(":DiffOrig") | 
				
			|||
  command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis | 
				
			|||
		  \ | wincmd p | diffthis | 
				
			|||
endif | 
				
			|||
 | 
				
			|||
if has('langmap') && exists('+langnoremap') | 
				
			|||
  " Prevent that the langmap option applies to characters that result from a | 
				
			|||
  " mapping.  If unset (default), this may break plugins (but it's backward | 
				
			|||
  " compatible). | 
				
			|||
  set langnoremap | 
				
			|||
endif | 
				
			|||
 | 
				
			|||
 | 
				
			|||
" Add optional packages. | 
				
			|||
" | 
				
			|||
" The matchit plugin makes the % command work better, but it is not backwards | 
				
			|||
" compatible. | 
				
			|||
packadd matchit | 
				
			|||
@ -0,0 +1,117 @@ | 
				
			|||
" An example for a vimrc file. | 
				
			|||
" | 
				
			|||
" Maintainer:	Bram Moolenaar <Bram@vim.org> | 
				
			|||
" Last change:	2016 Apr 05 | 
				
			|||
" | 
				
			|||
" To use it, copy it to | 
				
			|||
"     for Unix and OS/2:  ~/.vimrc | 
				
			|||
"	      for Amiga:  s:.vimrc | 
				
			|||
"  for MS-DOS and Win32:  $VIM\_vimrc | 
				
			|||
"	    for OpenVMS:  sys$login:.vimrc | 
				
			|||
 | 
				
			|||
" When started as "evim", evim.vim will already have done these settings. | 
				
			|||
if v:progname =~? "evim" | 
				
			|||
  finish | 
				
			|||
endif | 
				
			|||
 | 
				
			|||
" Use Vim settings, rather than Vi settings (much better!). | 
				
			|||
" This must be first, because it changes other options as a side effect. | 
				
			|||
set nocompatible | 
				
			|||
 | 
				
			|||
" allow backspacing over everything in insert mode | 
				
			|||
set backspace=indent,eol,start | 
				
			|||
 | 
				
			|||
if has("vms") | 
				
			|||
  set nobackup		" do not keep a backup file, use versions instead | 
				
			|||
else | 
				
			|||
  set backup		" keep a backup file (restore to previous version) | 
				
			|||
  set undofile		" keep an undo file (undo changes after closing) | 
				
			|||
endif | 
				
			|||
set history=50		" keep 50 lines of command line history | 
				
			|||
set ruler		" show the cursor position all the time | 
				
			|||
set showcmd		" display incomplete commands | 
				
			|||
set incsearch		" do incremental searching | 
				
			|||
 | 
				
			|||
" For Win32 GUI: remove 't' flag from 'guioptions': no tearoff menu entries | 
				
			|||
" let &guioptions = substitute(&guioptions, "t", "", "g") | 
				
			|||
 | 
				
			|||
" Don't use Ex mode, use Q for formatting | 
				
			|||
map Q gq | 
				
			|||
 | 
				
			|||
" CTRL-U in insert mode deletes a lot.  Use CTRL-G u to first break undo, | 
				
			|||
" so that you can undo CTRL-U after inserting a line break. | 
				
			|||
inoremap <C-U> <C-G>u<C-U> | 
				
			|||
 | 
				
			|||
" In many terminal emulators the mouse works just fine, thus enable it. | 
				
			|||
if has('mouse') | 
				
			|||
  set mouse=a | 
				
			|||
endif | 
				
			|||
 | 
				
			|||
" Switch syntax highlighting on when the terminal has colors or when using the | 
				
			|||
" GUI (which always has colors). | 
				
			|||
if &t_Co > 2 || has("gui_running") | 
				
			|||
  syntax on | 
				
			|||
 | 
				
			|||
  " Also switch on highlighting the last used search pattern. | 
				
			|||
  set hlsearch | 
				
			|||
 | 
				
			|||
  " I like highlighting strings inside C comments. | 
				
			|||
  let c_comment_strings=1 | 
				
			|||
endif | 
				
			|||
 | 
				
			|||
" Only do this part when compiled with support for autocommands. | 
				
			|||
if has("autocmd") | 
				
			|||
 | 
				
			|||
  " Enable file type detection. | 
				
			|||
  " Use the default filetype settings, so that mail gets 'tw' set to 72, | 
				
			|||
  " 'cindent' is on in C files, etc. | 
				
			|||
  " Also load indent files, to automatically do language-dependent indenting. | 
				
			|||
  filetype plugin indent on | 
				
			|||
 | 
				
			|||
  " Put these in an autocmd group, so that we can delete them easily. | 
				
			|||
  augroup vimrcEx | 
				
			|||
  au! | 
				
			|||
 | 
				
			|||
  " For all text files set 'textwidth' to 78 characters. | 
				
			|||
  autocmd FileType text setlocal textwidth=78 | 
				
			|||
 | 
				
			|||
  " When editing a file, always jump to the last known cursor position. | 
				
			|||
  " Don't do it when the position is invalid or when inside an event handler | 
				
			|||
  " (happens when dropping a file on gvim). | 
				
			|||
  autocmd BufReadPost * | 
				
			|||
    \ if line("'\"") >= 1 && line("'\"") <= line("$") | | 
				
			|||
    \   exe "normal! g`\"" | | 
				
			|||
    \ endif | 
				
			|||
 | 
				
			|||
  augroup END | 
				
			|||
 | 
				
			|||
else | 
				
			|||
 | 
				
			|||
  set autoindent		" always set autoindenting on | 
				
			|||
 | 
				
			|||
endif " has("autocmd") | 
				
			|||
 | 
				
			|||
" Make vim work with the 'crontab -e' command | 
				
			|||
set backupskip+=/var/spool/cron/* | 
				
			|||
 | 
				
			|||
" Convenient command to see the difference between the current buffer and the | 
				
			|||
" file it was loaded from, thus the changes you made. | 
				
			|||
" Only define it when not defined already. | 
				
			|||
if !exists(":DiffOrig") | 
				
			|||
  command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis | 
				
			|||
		  \ | wincmd p | diffthis | 
				
			|||
endif | 
				
			|||
 | 
				
			|||
if has('langmap') && exists('+langnoremap') | 
				
			|||
  " Prevent that the langmap option applies to characters that result from a | 
				
			|||
  " mapping.  If unset (default), this may break plugins (but it's backward | 
				
			|||
  " compatible). | 
				
			|||
  set langnoremap | 
				
			|||
endif | 
				
			|||
 | 
				
			|||
 | 
				
			|||
" Add optional packages. | 
				
			|||
" | 
				
			|||
" The matchit plugin makes the % command work better, but it is not backwards | 
				
			|||
" compatible. | 
				
			|||
packadd matchit | 
				
			|||
@ -0,0 +1,19 @@ | 
				
			|||
# HOW TO EDIT THIS FILE: | 
				
			|||
# The "handy ruler" below makes it easier to edit a package description.  Line | 
				
			|||
# up the first '|' above the ':' following the base package name, and the '|' | 
				
			|||
# on the right side marks the last column you can put a character in.  You must | 
				
			|||
# make exactly 11 lines for the formatting to be correct.  It's also | 
				
			|||
# customary to leave one space after the ':'. | 
				
			|||
 | 
				
			|||
             |-----handy-ruler------------------------------------------------------| | 
				
			|||
rocket-config: rocket-config (my configuration files) | 
				
			|||
rocket-config: | 
				
			|||
rocket-config: This package contains my custom system configuration, | 
				
			|||
rocket-config:   to be updated through slackpkg. | 
				
			|||
rocket-config: | 
				
			|||
rocket-config: If it detects a default config file, it will be replaced, | 
				
			|||
rocket-config:   and the original will be saved with the .orig extension. | 
				
			|||
rocket-config: Consider removing the .orig files, or restore them when removing | 
				
			|||
rocket-config:   this package. | 
				
			|||
rocket-config: | 
				
			|||
rocket-config: See /usr/doc for more info. | 
				
			|||
					Loading…
					
					
				
		Reference in new issue