From c73726e5e29a206b35ae4cc3b2f4bf60de6f864c Mon Sep 17 00:00:00 2001 From: tzim Date: Tue, 13 Jan 2015 15:58:50 +0000 Subject: [PATCH] Conf live --- live-dmx/auto/config | 2 +- live-dmx/config/hooks/stripped.chroot | 56 +++++++++++++++++++ .../includes.chroot/etc/default/dnsmasq | 33 +++++++++++ live-dmx/config/includes.chroot/etc/skel/LIVE | 1 - .../includes.chroot/etc/skel/autostart.sh | 3 + .../lib/live/config/0091-gstreamersharp | 22 ++++++++ .../lib/live/config/0095-update | 22 ++++++++ .../lib/live/config/0096-live-link | 30 ++++++++++ .../usr/local/hostapd-scripts/dnsmasq.conf | 0 .../usr/local/hostapd-scripts/hostapd.conf | 0 .../usr/local/hostapd-scripts/startAP.sh | 0 .../config/package-lists/dkms.list.chroot | 4 +- .../config/package-lists/wserver.list.chroot | 4 ++ 13 files changed, 173 insertions(+), 4 deletions(-) create mode 100755 live-dmx/config/hooks/stripped.chroot create mode 100644 live-dmx/config/includes.chroot/etc/default/dnsmasq delete mode 120000 live-dmx/config/includes.chroot/etc/skel/LIVE create mode 100755 live-dmx/config/includes.chroot/lib/live/config/0091-gstreamersharp create mode 100755 live-dmx/config/includes.chroot/lib/live/config/0095-update create mode 100755 live-dmx/config/includes.chroot/lib/live/config/0096-live-link create mode 100644 live-dmx/config/includes.chroot/usr/local/hostapd-scripts/dnsmasq.conf create mode 100644 live-dmx/config/includes.chroot/usr/local/hostapd-scripts/hostapd.conf create mode 100644 live-dmx/config/includes.chroot/usr/local/hostapd-scripts/startAP.sh create mode 100644 live-dmx/config/package-lists/wserver.list.chroot diff --git a/live-dmx/auto/config b/live-dmx/auto/config index 773695e..6f248e3 100755 --- a/live-dmx/auto/config +++ b/live-dmx/auto/config @@ -6,6 +6,6 @@ lb config noauto \ --bootappend-live "persistence boot=live config locales=fr_FR.UTF-8 keyboard-layouts=fr basemountmode=rw,noatime,umask=000" \ --bootappend-install "locales=fr_FR.UTF-8" \ --archive-areas "main contrib non-free" \ - --apt-recommends true \ + --apt-recommends true --apt-indices false \ --architectures i386 -b hdd \ "${@}" diff --git a/live-dmx/config/hooks/stripped.chroot b/live-dmx/config/hooks/stripped.chroot new file mode 100755 index 0000000..c6a2f67 --- /dev/null +++ b/live-dmx/config/hooks/stripped.chroot @@ -0,0 +1,56 @@ +#!/bin/sh + +## live-build(7) - System Build Scripts +## Copyright (C) 2006-2013 Daniel Baumann +## +## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. +## This is free software, and you are welcome to redistribute it +## under certain conditions; see COPYING for details. + + +set -e + +# WARNING: Using this hook will result in a stripped system, means, +# it may very well be possible that other packages are depending +# on certain files that get removed here. +# Therefore, this hooks is merely an inspiration for what could be +# removed and not a generic nor recommendet solution to get the +# image filesize down. In any event, using this hook can lead to +# unforseen bugs and breakages in other packages and you should +# be prepared to find and fix it for your own images. + +# Removing unused packages +for PACKAGE in apt-utils aptitude man-db manpages info dselect +do + if ! apt-get remove --purge --yes "${PACKAGE}" + then + echo "WARNING: ${PACKAGE} isn't installed" + fi +done + +apt-get autoremove --yes || true + +# Removing unused files +find / -name *~ ! -path "/root/config/*" -print0 | xargs -0 rm -f +find / -type d -name ".svn" ! -path "/root/config/*" -print0 | xargs -0 rm -rf + +rm -rf /usr/include/* +#rm -rf /usr/share/groff/* +rm -rf /usr/share/doc/* +#rm -rf /usr/share/locale/* +rm -rf /usr/share/man/* +#rm -rf /usr/share/i18n/* +rm -rf /usr/share/info/* +rm -rf /usr/share/lintian/* +rm -rf /usr/share/linda/* +#rm -rf /usr/share/zoneinfo/* +rm -rf /var/cache/man/* + +# Truncating logs +for FILE in $(find /var/log/ -type f) +do + : > ${FILE} +done + + + diff --git a/live-dmx/config/includes.chroot/etc/default/dnsmasq b/live-dmx/config/includes.chroot/etc/default/dnsmasq new file mode 100644 index 0000000..4421714 --- /dev/null +++ b/live-dmx/config/includes.chroot/etc/default/dnsmasq @@ -0,0 +1,33 @@ +# This file has five functions: +# 1) to completely disable starting dnsmasq, +# 2) to set DOMAIN_SUFFIX by running `dnsdomainname` +# 3) to select an alternative config file +# by setting DNSMASQ_OPTS to --conf-file= +# 4) to tell dnsmasq to read the files in /etc/dnsmasq.d for +# more configuration variables. +# 5) to stop the resolvconf package from controlling dnsmasq's +# idea of which upstream nameservers to use. +# For upgraders from very old versions, all the shell variables set +# here in previous versions are still honored by the init script +# so if you just keep your old version of this file nothing will break. + +#DOMAIN_SUFFIX=`dnsdomainname` +#DNSMASQ_OPTS="--conf-file=/etc/dnsmasq.alt" + +# Whether or not to run the dnsmasq daemon; set to 0 to disable. +ENABLED=0 + +# By default search this drop directory for configuration options. +# Libvirt leaves a file here to make the system dnsmasq play nice. +# Comment out this line if you don't want this. The dpkg-* are file +# endings which cause dnsmasq to skip that file. This avoids pulling +# in backups made by dpkg. +CONFIG_DIR=/etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new + +# If the resolvconf package is installed, dnsmasq will use its output +# rather than the contents of /etc/resolv.conf to find upstream +# nameservers. Uncommenting this line inhibits this behaviour. +# Not that including a "resolv-file=" line in +# /etc/dnsmasq.conf is not enough to override resolvconf if it is +# installed: the line below must be uncommented. +#IGNORE_RESOLVCONF=yes diff --git a/live-dmx/config/includes.chroot/etc/skel/LIVE b/live-dmx/config/includes.chroot/etc/skel/LIVE deleted file mode 120000 index 6f56590..0000000 --- a/live-dmx/config/includes.chroot/etc/skel/LIVE +++ /dev/null @@ -1 +0,0 @@ -/lib/live/mount/medium \ No newline at end of file diff --git a/live-dmx/config/includes.chroot/etc/skel/autostart.sh b/live-dmx/config/includes.chroot/etc/skel/autostart.sh index 4906f35..04843b5 100755 --- a/live-dmx/config/includes.chroot/etc/skel/autostart.sh +++ b/live-dmx/config/includes.chroot/etc/skel/autostart.sh @@ -1,5 +1,8 @@ #!/bin/sh +sudo chown root:audio /dev/snd/seq +sudo chmod g+rw /dev/snd/seq + tint2 & pulseaudio --start nm-applet & diff --git a/live-dmx/config/includes.chroot/lib/live/config/0091-gstreamersharp b/live-dmx/config/includes.chroot/lib/live/config/0091-gstreamersharp new file mode 100755 index 0000000..3c49bc4 --- /dev/null +++ b/live-dmx/config/includes.chroot/lib/live/config/0091-gstreamersharp @@ -0,0 +1,22 @@ +#!/bin/sh + +## live-config(7) - System Configuration Scripts +## Copyright (C) 2006-2013 Daniel Baumann +## +## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. +## This is free software, and you are welcome to redistribute it +## under certain conditions; see COPYING for details. + + +GStreamerSharp () +{ + + if [ -e /usr/lib/cli/gstreamer-sharp-0.9/libgstreamersharpglue-0.10.so ] + then + cp /usr/lib/cli/gstreamer-sharp-0.9/libgstreamersharpglue-0.10.so /usr/lib/mono/gac/gstreamer-sharp/*/ + fi + + return +} + +GStreamerSharp diff --git a/live-dmx/config/includes.chroot/lib/live/config/0095-update b/live-dmx/config/includes.chroot/lib/live/config/0095-update new file mode 100755 index 0000000..0a7b1d6 --- /dev/null +++ b/live-dmx/config/includes.chroot/lib/live/config/0095-update @@ -0,0 +1,22 @@ +#!/bin/sh + +## live-config(7) - System Configuration Scripts +## Copyright (C) 2006-2013 Daniel Baumann +## +## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. +## This is free software, and you are welcome to redistribute it +## under certain conditions; see COPYING for details. + + +Update () +{ + + if [ -e /lib/live/mount/medium/loupiottes-update.txz ] + then + tar xJf /lib/live/mount/medium/loupiottes-update.txz -C / + fi + + return +} + +Update diff --git a/live-dmx/config/includes.chroot/lib/live/config/0096-live-link b/live-dmx/config/includes.chroot/lib/live/config/0096-live-link new file mode 100755 index 0000000..aeece8a --- /dev/null +++ b/live-dmx/config/includes.chroot/lib/live/config/0096-live-link @@ -0,0 +1,30 @@ +#!/bin/sh + +## live-config(7) - System Configuration Scripts +## Copyright (C) 2006-2013 Daniel Baumann +## +## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. +## This is free software, and you are welcome to redistribute it +## under certain conditions; see COPYING for details. + + +LIVELink () +{ + + if [ ! -e /home/${LIVE_USERNAME} ] + then + return + fi + + if [ -e /home/${LIVE_USERNAME}/LIVE ] + then + return + fi + + echo -n " live-link" + + ln -s /lib/live/mount/medium /home/${LIVE_USERNAME}/LIVE + +} + +LIVELink diff --git a/live-dmx/config/includes.chroot/usr/local/hostapd-scripts/dnsmasq.conf b/live-dmx/config/includes.chroot/usr/local/hostapd-scripts/dnsmasq.conf new file mode 100644 index 0000000..e69de29 diff --git a/live-dmx/config/includes.chroot/usr/local/hostapd-scripts/hostapd.conf b/live-dmx/config/includes.chroot/usr/local/hostapd-scripts/hostapd.conf new file mode 100644 index 0000000..e69de29 diff --git a/live-dmx/config/includes.chroot/usr/local/hostapd-scripts/startAP.sh b/live-dmx/config/includes.chroot/usr/local/hostapd-scripts/startAP.sh new file mode 100644 index 0000000..e69de29 diff --git a/live-dmx/config/package-lists/dkms.list.chroot b/live-dmx/config/package-lists/dkms.list.chroot index 310b2c3..d45c000 100644 --- a/live-dmx/config/package-lists/dkms.list.chroot +++ b/live-dmx/config/package-lists/dkms.list.chroot @@ -8,9 +8,9 @@ firmware-realtek amd64-microcode intel-microcode -linux-headers-amd64 +#if 0 + linux-headers-amd64 -#if PARENT_ARCHIVE_AREAS contrib # virtualbox virtualbox-guest-dkms virtualbox-guest-utils diff --git a/live-dmx/config/package-lists/wserver.list.chroot b/live-dmx/config/package-lists/wserver.list.chroot new file mode 100644 index 0000000..a1020b5 --- /dev/null +++ b/live-dmx/config/package-lists/wserver.list.chroot @@ -0,0 +1,4 @@ +hostapd +dnsmasq +mini-httpd +