summaryrefslogtreecommitdiffstats
path: root/data
diff options
context:
space:
mode:
authorSimon Rettberg2014-02-03 17:13:19 +0100
committerSimon Rettberg2014-02-03 17:13:19 +0100
commit4bd02868957f5a4b317d5a821d9c72312b7dd676 (patch)
tree33ff229290a8e1d3fa68d94cca51c984b45aeefb /data
parent[openslx] Experimental -i switch when packing sqfs to filter files from anoth... (diff)
downloadtm-scripts-4bd02868957f5a4b317d5a821d9c72312b7dd676.tar.gz
tm-scripts-4bd02868957f5a4b317d5a821d9c72312b7dd676.tar.xz
tm-scripts-4bd02868957f5a4b317d5a821d9c72312b7dd676.zip
Clean up root 'data' dir... Lots of old stuff not required anymore or already taken care of
Diffstat (limited to 'data')
-rw-r--r--data/README.data9
-rw-r--r--data/activate-swap.sh35
-rwxr-xr-xdata/analyse-disk.sh105
-rw-r--r--data/basic.nocopy32
-rwxr-xr-xdata/disk-tmp.sh24
-rw-r--r--data/ip-dns-conf86
-rw-r--r--data/printk.service6
7 files changed, 0 insertions, 297 deletions
diff --git a/data/README.data b/data/README.data
deleted file mode 100644
index fdf10a47..00000000
--- a/data/README.data
+++ /dev/null
@@ -1,9 +0,0 @@
-This directory contains the config and share-able stuff for the InitRamFS. The
-following structure applies
-
-~/data/base - distro-independent fall-back files
-~/data/<distroname>/base - distro-dependent version-independent files
-~/data/<distroname>/<distro_ver> - distro-dependenent version-dependent files
-
-The principle should be pretty simple - copy all from very generic to very
-specific overwriting the generic files.
diff --git a/data/activate-swap.sh b/data/activate-swap.sh
deleted file mode 100644
index edaad1f2..00000000
--- a/data/activate-swap.sh
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/sh
-# Copyright (c) 2013 - OpenSLX GmbH
-#
-# This program is free software distributed under the GPL version 2.
-# See http://openslx.org/COPYING
-#
-# If you have any feedback please consult http://openslx.org/feedback and
-# send your feedback to feedback@openslx.org
-#
-# General information about OpenSLX can be found under http://openslx.org
-#
-# Initialize swap for OpenSLX linux stateless clients, first for swap as
-# compressed RAM (zram) and then on local disk partitions, if detected by
-# disk-analyse.sh script
-
-#############################################################################
-
-# Depends on analyse-disk.sh and on availability of the appropriate kernel
-# module/functionality
-
-# try to enable compressed RAM SWAP / ZRAM
-if modprobe -q zram 2>/dev/null ; then
- # assign a quarter of total mem to zram
- echo $(( $(free -k | awk '/^Mem:/ { print $2 }') * 256 )) > /sys/block/zram0/disksize
- mkswap /dev/zram0 2>/dev/null
- swapon /dev/zram0 1>/dev/null 2>/dev/null
-fi
-
-# add on-disk swap if available
-for hdpartnr in $(cat /etc/fstab | sed -n -e "/swap.*swap/p"| \
- sed -e "s/[[:space:]].*//") ; do
- mkswap ${hdpartnr} 2>/dev/null
- swapon ${hdpartnr} 1>/dev/null 2>/dev/null
-done
-
diff --git a/data/analyse-disk.sh b/data/analyse-disk.sh
deleted file mode 100755
index 27c3f306..00000000
--- a/data/analyse-disk.sh
+++ /dev/null
@@ -1,105 +0,0 @@
-#!/bin/bash
-# Copyright (c) 2013 - OpenSLX GmbH
-#
-# This program is free software distributed under the GPL version 2.
-# See http://openslx.org/COPYING
-#
-# If you have any feedback please consult http://openslx.org/feedback and
-# send your feedback to feedback@openslx.org
-#
-# General information about OpenSLX can be found under http://openslx.org
-#
-# Local hard disk autodetection script for OpenSLX linux stateless clients,
-# detecting swap and special partitions
-
-#############################################################################
-
-# General formatter for the /tmp partition on a local harddisk
-diskfm () {
-local target=$1
-local fs
-local path
-for fs in xfs ext3 ext2 ; do
- unset available
- case $(cat /proc/filesystems) in
- *${fs}*) available=yes;;
- *) modprobe -q ${fs} 2>/dev/null && available=yes;;
- esac
- if [ -n ${available} ]; then
- unset found
- for path in /sbin /bin /usr/sbin /usr/bin /openslx/sbin /openslx/bin; do
- if test -x /$path/mkfs.$fs ; then
- found=yes
- case mkfs.$fs in
- mkfs.xfs)
- fopt="-f"
- mopt="-o noexec"
- ;;
- mkfs.ext2)
- fopt="-Fq"
- mopt="-o nocheck,noexec"
- ;;
- mkfs.reiserfs)
- fopt="-f"
- mopt="-o noexec"
- ;;
- esac
- mkfs.$fs ${fopt} ${target} >/dev/null 2>&1 #|| error
- mkdir -p /run/mount/tmp
- mount -t ${fs} ${target} /run/mount/tmp
- fi
- done
- [ -n "$found" ] && break
- fi
-done
-}
-
-# Check for local harddisks and appropriate partitions
-fdisk -l |sed -n "/^\/dev\//p" >/etc/disk.partition
-
-# Check for standard swap partitions and make them available to the system
-for hdpartnr in $(cat /etc/disk.partition | \
- sed -n -e "/ 82 /p"|sed -e "s/[[:space:]].*//") ; do
- echo -e "$hdpartnr\tswap\t\tswap\t\tdefaults\t 0 0" >>/etc/fstab
-done
-
-# We use special non assigned partition type (id44) for harddisk scratch
-# space, thus no normal filesystem will be incidentally deleted or
-# corrupted
-for hdpartnr in $(cat /etc/disk.partition | \
- sed -n -e "/ 44 /p"|sed -e "s/[[:space:]].*//") ; do
- # check for supported filesystem and formatter
- ( if diskfm $hdpartnr ; then
- # echo "$hdpartnr is mounted to /mnt/tmp at $(sysup)" >/tmp/tmpready
- echo -e "$hdpartnr\t/tmp\t\tnoauto\t\tdefaults\t 0 0" >>/etc/fstab
- else
- echo "formatting failed for some reason " >/tmp/tmpready
- fi ) &
- break
-done
-
-# Put detected linux partitions (83) into /etc/fstab with "noauto", special
-# partition 45 (persistent scratch) to /var/scratch and 46 to /var/openslx
-for partid in 83 45 46 ; do
- for hdpartnr in $(cat /etc/disk.partition | \
- sed -n -e "/ ${partid} /p"|sed -e "s/[[:space:]].*//") ; do
- mkdir -p /media/${hdpartnr#/dev/*} 2>/dev/null
- if [ ${partid} -eq 83 ] ; then
- echo -e "$hdpartnr\t/media/${hdpartnr#/dev/*}\tauto\t\tnoauto,\
-noexec\t 0 0" >>/tmp/fstab
- elif [ ${partid} -eq 45 ] ; then
- #mount -t auto ${hdpartnr} /media/${hdpartnr#/dev/*}
- #ln -sf /media/${hdpartnr#/dev/*} /var/scratch
- echo -e "${hdpartnr}\t/media/${hdpartnr#/dev/*}\tauto\t\tnoauto\
-\t\t 0 0" >>/tmp/fstab
- elif [ ${partid} -eq 46 ] ; then
- # Mount a home directory to (/mnt)/var/home
- #mount -t auto ${hdpartnr} /mnt/media/${hdpartnr#/dev/*} \n\
- #test -d /mnt/media/${hdpartnr#/dev/*}/home && \
- # ln -sf /media/${hdpartnr#/dev/*} /var/home
- echo -e "${hdpartnr}\t/media/${hdpartnr#/dev/*}\tauto\t\tnoauto\
-\t\t 0 0" >>/tmp/fstab
- fi
- done
-done
-
diff --git a/data/basic.nocopy b/data/basic.nocopy
deleted file mode 100644
index b81a32c4..00000000
--- a/data/basic.nocopy
+++ /dev/null
@@ -1,32 +0,0 @@
-/boot
-/cdrom
-/dev
-/export
-/home
-/lib/modules
-/lost+found
-/media
-/mnt
-/opt/openslx
-/proc
-/root
-/run
-/srv
-/sys
-/tmp
-/usr/src
-/var/log
-/var/run
-/var/www
-/var/cache/nscd
-/etc/resolv.conf
-/etc/resolvconf
-*~
-*.bak
-*.pid
-*.tmp
-*tm-scripts*
-/initrd.img
-/initrd.img.old
-/vmlinuz
-/vmlinuz.old
diff --git a/data/disk-tmp.sh b/data/disk-tmp.sh
deleted file mode 100755
index 4378c45c..00000000
--- a/data/disk-tmp.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-# Copyright (c) 2013 - OpenSLX GmbH
-#
-# This program is free software distributed under the GPL version 2.
-# See http://openslx.org/COPYING
-#
-# If you have any feedback please consult http://openslx.org/feedback and
-# send your feedback to feedback@openslx.org
-#
-# General information about OpenSLX can be found under http://openslx.org
-#
-# Mount local ID44 partition to /tmp after all existing stuff is preserved
-
-#############################################################################
-
-# Check if ID44 is available by analysing /etc/fstab for appropriate entry
-if cat /proc/mounts | grep -qe "/dev/.*/tmp" ; then
- mkdir -p /run/tmp
- mv /tmp/* /run/tmp
- mount --bind /run/mount/tmp /tmp
- umount /run/mount/tmp
- mv /run/tmp/* /tmp
- rmdir /run/tmp
-fi
diff --git a/data/ip-dns-conf b/data/ip-dns-conf
deleted file mode 100644
index f14ecd88..00000000
--- a/data/ip-dns-conf
+++ /dev/null
@@ -1,86 +0,0 @@
-#!/bin/sh
-# Copyright (c) 2013 - OpenSLX GmbH
-#
-# This program is free software distributed under the GPL version 2.
-# See http://openslx.org/COPYING
-#
-# If you have any feedback please consult http://openslx.org/feedback and
-# send your feedback to feedback@openslx.org
-#
-# General information about OpenSLX can be found under http://openslx.org
-#
-# Set IP and DNS configuration ...
-
-#############################################################################
-
-# Depends on running network interface, provides IP and DNS configuration
-
-# Dns and ip configuration, hostname of the machine --> to be merged with udhcpc.default.script!!
-echo "$host_name" >/proc/sys/kernel/hostname
-echo -e "# /etc/hosts - file generated by $0 during OpenSLX stage3\
-\n#\n# IP-Address Full-Qualified-Hostname Short-Hostname\n#\n\
-127.0.0.1\tlocalhost\n::1\t\tlocalhost ipv6-localhost ipv6-loopback\n\
-fe00::0\t\tipv6-localnet\nff00::0\t\tipv6-mcastprefix\nff02::1\
-\t\tipv6-allnodes\nff02::2\t\tipv6-allrouters\nff02::3\t\t\
-ipv6-allhosts\n" >/etc/hosts
-if [ -n "${domain_name}" ]; then
- echo -en "${clientip}\t" >>/etc/hosts
- for name in ${domain_name}; do
- echo -en "${host_name}.${name} " >>/etc/hosts
- done
- echo -e "${host_name}" >>/etc/hosts
-else
- echo -e "${clientip}\t${host_name}" >>/etc/hosts
-fi
-# set up domainname and resolving
-#rm -rf /etc/resolv.conf
-
-out=/etc/resolv.conf
-echo -e "# /etc/resolv.conf - file generated by\n#\t$0:\n\
-#\t${date}\n#options timeout:1 attempts:1 rotate" > $out
-
-[ "x${domain_name}" != "x" ] && echo -e "domain ${domain_name}" >> $out
-[ "x${domain_search}" != "x" ] && echo -e "search ${domain_search}" >> $out
-# fallback
-[ "x${domain_search}" == "x" ] && [ "x${domain_name}" != "x" ] && \
- echo -e "search ${domain_name}" >> $out
-
-[ -n "${domain_name_servers}" ] && {
- for name in ${domain_name_servers}; do
- echo nameserver ${name} >> $out;
- done; }
-
-# Create hostname file
-[ -n ${host_name} ] && [ -n ${domain_name} ] && \
- echo "${host_name}.${domain_name}" > /etc/hostname
-
-
-# Set greeting and add information on booted system
-len=$(expr length ${SLXVERSION}${SYSTEM_NAME})
-if [ $len -le 28 ] ; then
- vdstr="Stateless Workstation (V${SLXVERSION}/${SYSTEM_NAME})"
- smax=28
-else
- vdstr="V${SLXVERSION}/${SYSTEM_NAME}"
- smax=52
-fi
-while [ $len -le $smax ] ; do
- vdstr="$vdstr "
- len=$(($len + 1))
-done
-len=$(expr length ${host_name})
-while [ $len -le 30 ] ; do
- space="$space "
- len=$(($len + 1))
-done
-echo "
- WELCOME TO $space \n (\l)
- _____ ______ ______ __ __ _______ __ __ __
- / _ | _ | ___| | | | | ____| | | | | |
- | | | | |_| | |_ | | | | |___ | | / /
- | | | | ___/| _| | | ____ | | | |
- | |_| | | | |___| | | | ____| | |___ / /
- _____/|__| |______|__| |__| |_______|______|__| |__|
-
- $vdstr (c) <OpenSLX.ORG>
-" >/etc/issue
diff --git a/data/printk.service b/data/printk.service
deleted file mode 100644
index 97fe8055..00000000
--- a/data/printk.service
+++ /dev/null
@@ -1,6 +0,0 @@
-[Unit]
-Description=shuts up kernel
-
-[Service]
-Type=simple
-ExecStart=/openslx/bin/echo "0" > /proc/sys/kernel/printk