From 9bae6d0d3506074af9ece6219d257ff6afa311be Mon Sep 17 00:00:00 2001 From: geos_one Date: Sun, 31 Oct 2010 13:20:29 +0000 Subject: [PATCH] add dynamic motd generator git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/genlink@2634 6952d904-891a-0410-993b-d76249ca496b --- Documentation/ls_pro_live/fsscript | 28 ++++++++++----- .../ls_pro_live/portage/profile/make.defaults | 6 ++-- .../ls_pro_live/portage/profile/packages | 3 +- app-admin/motd-base/Manifest | 5 +++ app-admin/motd-base/files/motd.d/00-header | 4 +++ app-admin/motd-base/files/motd.d/10-help-text | 5 +++ .../motd-base/files/motd.d/20-linux-logo | 6 ++++ app-admin/motd-base/files/motd.d/99-footer | 10 ++++++ app-admin/motd-base/motd-base-1.ebuild | 23 ++++++++++++ app-admin/update-motd/Manifest | 2 ++ app-admin/update-motd/update-motd-3.5.ebuild | 35 +++++++++++++++++++ 11 files changed, 114 insertions(+), 13 deletions(-) create mode 100644 app-admin/motd-base/Manifest create mode 100755 app-admin/motd-base/files/motd.d/00-header create mode 100755 app-admin/motd-base/files/motd.d/10-help-text create mode 100755 app-admin/motd-base/files/motd.d/20-linux-logo create mode 100755 app-admin/motd-base/files/motd.d/99-footer create mode 100644 app-admin/motd-base/motd-base-1.ebuild create mode 100644 app-admin/update-motd/Manifest create mode 100644 app-admin/update-motd/update-motd-3.5.ebuild diff --git a/Documentation/ls_pro_live/fsscript b/Documentation/ls_pro_live/fsscript index 07a524f..3c0a1c2 100755 --- a/Documentation/ls_pro_live/fsscript +++ b/Documentation/ls_pro_live/fsscript @@ -1,10 +1,12 @@ #!/bin/sh + +# link the kernel and initrd for the inital package cd /boot ln -sf uImage-*.buffalo uImage.buffalo ln -sf initrd-*.buffalo initrd.buffalo # no search for .svn dir -# as a subversiontree is used for /etc/portage & /var/lib/layman/go-genlink -# so remove by hand +# subversiontrees are used for /etc/portage & /var/lib/layman/go-genlink +# so remove manually rm -rf /.svn rm -rf /etc/.svn rm -rf /etc/conf.d/.svn @@ -17,13 +19,23 @@ rm -rf /usr/.svn rm -rf /usr/local/.svn rm -rf /usr/local/bin/.svn -# qemu-arm don't work woth the newer coreutils +# qemu-arm don't work with newer coreutils +# but the linkstation works with it rm -f /etc/portage/package.mask/coreutils -emerge --sync -# shrink the image by removing most of the /usr/portage dir -# the only dirs that survive are licenses (not requred), profile (required), virtual (not required) -rm -rf /usr/portage/*-* +# clean all not needed packages +emerge --depclean -# chamge password for root user +# unmount the snapshot for creationg the initial portage dir in the final package +umount /usr/portage + +# shrink the image by only syncing the requred dirs into /usr/portage +# the only dirs that survive are profiles (required), eclass (required), licenses (required) +# we have to use the IP as the resolve.conf file is already gone +# but a new one will be added in a later phase of catylast +rsync -aPv rsync://83.164.133.198/gentoo-portage/profiles /usr/portage/ +rsync -aPv rsync://83.164.133.198/gentoo-portage/eclass /usr/portage/ +rsync -aPv rsync://83.164.133.198/gentoo-portage/licenses /usr/portage/ + +# change password for root user /usr/local/bin/changepassword root goLsProLive diff --git a/Documentation/ls_pro_live/portage/profile/make.defaults b/Documentation/ls_pro_live/portage/profile/make.defaults index f381396..c77684d 100644 --- a/Documentation/ls_pro_live/portage/profile/make.defaults +++ b/Documentation/ls_pro_live/portage/profile/make.defaults @@ -12,17 +12,17 @@ ACCEPT_KEYWORDS="arm ~arm" # CXXFLAGS="${CFLAGS}" # CPPFLAGS="${CFLAGS}" -USE="${USE} 7zip apache2 arm authdaemond authfile bash-completion clamav \ +USE="${USE} 7zip apache2 armv5 authdaemond authfile bash-completion clamav \ clamd maildir php posix postfix pam glibc-omitfp \ procmail samba sasl slang softquota symlink tokenizer usb \ -oss -branding -esd xine mp3 gnutls cups ppds \ foomatic-db alsa hal gimpprint freetype X unicode rdesktop pda \ zeroconf xinerama java sqlite\ sms quotas dvb xprint theora ogg a52 matroska v4l xvid network \ - fame svg ffmpeg 7Zip css audiofile musicbrainz scanner \ + fame svg ffmpeg css audiofile musicbrainz scanner \ musepack new-login kerberos dbus openexr aac fat hfs jfs xfs \ ntfs reiserfs cjk cdda dts imap cairo sysfs xpm nptl nptlonly \ - gs lzo mjpeg mmx speex slp fftw xvmc v4l2 cpudetection extramodules \ + gs lzo mjpeg speex slp fftw xvmc v4l2 cpudetection extramodules \ mail -apm ipod flac avahi stream live tiff usb x264 dv lame mp3rtp \ udev cdr dvi libnotify bzip2 aalib mng cddb -beagle -gnome -evo mono \ -eds png gif -qt4 inotify graphite \ diff --git a/Documentation/ls_pro_live/portage/profile/packages b/Documentation/ls_pro_live/portage/profile/packages index 15eaee8..3735627 100644 --- a/Documentation/ls_pro_live/portage/profile/packages +++ b/Documentation/ls_pro_live/portage/profile/packages @@ -22,5 +22,4 @@ *app-admin/showconsole *sys-libs/timezone-data *net-misc/dhcpcd -*sys-apps/micro_evtd -*app-misc/linux-logo \ No newline at end of file +*sys-apps/micro_evtd \ No newline at end of file diff --git a/app-admin/motd-base/Manifest b/app-admin/motd-base/Manifest new file mode 100644 index 0000000..94360c8 --- /dev/null +++ b/app-admin/motd-base/Manifest @@ -0,0 +1,5 @@ +AUX motd.d/00-header 57 RMD160 9bd1766403b866cd4beb0158d1fdd00bc99f3aaf SHA1 bc1b6a5403f9b6e331c660bde88440505328b005 SHA256 72e9c56912bd112a3ec63db880bf2908753df5ecbe06eee4e98cfd11a1f2d6da +AUX motd.d/10-help-text 96 RMD160 e72204b9666f1cc317b8e9e7fae833d2e97e27ca SHA1 305fdc18cf3e79b1ed80c2ba6db1cc2791457e73 SHA256 0b35ea7ee40473d96bf9243a96687e10cd57bcd53c7d70649b4aa987b7a22fd7 +AUX motd.d/20-linux-logo 167 RMD160 174611c507cb206397c31819637d2e11e36bdcf3 SHA1 89771ebbb42d64ab0fcc8bc31a0c4336475afce1 SHA256 85ca75de7175589767e19306d9b1a2326448a1eaa3e575394d9e0d5f31a9a6bf +AUX motd.d/99-footer 261 RMD160 bc079cb699f07e1be6c3272647ef4e631f4b11d0 SHA1 9872e8f9eb8f80cd5e7e262e8d8f8074110dcf70 SHA256 38c64225ecb7486461ce84199f120d8b13e7f13764df430c3cc10a9695023ee6 +EBUILD motd-base-1.ebuild 440 RMD160 9a753c5fd13b2119d24556a209447287bb0f5f1c SHA1 0e63609a5900b9bd86b839046122f8fa856d0488 SHA256 1ec5ed3543f58f2e93ed90226c0a7095fff682501fcc0a0a43641142f1f6b57e diff --git a/app-admin/motd-base/files/motd.d/00-header b/app-admin/motd-base/files/motd.d/00-header new file mode 100755 index 0000000..e3195bc --- /dev/null +++ b/app-admin/motd-base/files/motd.d/00-header @@ -0,0 +1,4 @@ +#!/bin/sh + +uname -a +printf "%s\n" "$(lsb_release -s -d)" diff --git a/app-admin/motd-base/files/motd.d/10-help-text b/app-admin/motd-base/files/motd.d/10-help-text new file mode 100755 index 0000000..4dddb6f --- /dev/null +++ b/app-admin/motd-base/files/motd.d/10-help-text @@ -0,0 +1,5 @@ +#!/bin/sh + +echo +echo "Welcome to Gentoo Linux!" +echo " * Documentation: http://www.gentoo.org" diff --git a/app-admin/motd-base/files/motd.d/20-linux-logo b/app-admin/motd-base/files/motd.d/20-linux-logo new file mode 100755 index 0000000..89e3a0f --- /dev/null +++ b/app-admin/motd-base/files/motd.d/20-linux-logo @@ -0,0 +1,6 @@ +#!/bin/sh + +# To add dynamic information, add a numbered +# script to /etc/update-motd.d/ + +[ -f /usr/bin/linux_logo ] && /usr/bin/linux_logo -f -u -L gentoo-alt || true diff --git a/app-admin/motd-base/files/motd.d/99-footer b/app-admin/motd-base/files/motd.d/99-footer new file mode 100755 index 0000000..a444c0b --- /dev/null +++ b/app-admin/motd-base/files/motd.d/99-footer @@ -0,0 +1,10 @@ +#!/bin/sh + +# motd.tail is reserved for the admin to append static +# trailing information to a dynamically generated +# /etc/motd. +# +# To add dynamic information, add a numbered +# script to /etc/update-motd.d/ + +[ -f /etc/motd.tail ] && cat /etc/motd.tail || true diff --git a/app-admin/motd-base/motd-base-1.ebuild b/app-admin/motd-base/motd-base-1.ebuild new file mode 100644 index 0000000..4e94574 --- /dev/null +++ b/app-admin/motd-base/motd-base-1.ebuild @@ -0,0 +1,23 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +inherit eutils + +DESCRIPTION="Base Motd Files for gentoo" +HOMEPAGE="http://linamh.disconnected-by-peer.at" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="" + +DEPEND="" +RDEPEND="app-admin/update-motd + app-misc/linux-logo + sys-apps/lsb-release" + +src_install() { + insinto /etc/update-motd.d + doins "${FILESDIR}"/motd.d/* +} diff --git a/app-admin/update-motd/Manifest b/app-admin/update-motd/Manifest new file mode 100644 index 0000000..c796149 --- /dev/null +++ b/app-admin/update-motd/Manifest @@ -0,0 +1,2 @@ +DIST update-motd_3.5.orig.tar.gz 17686 RMD160 f4df6d07798a04c69d0ae7740b806551c6bc5e46 SHA1 4e34fa820463bebb83c4a30cfbe4f0496f8eb1e7 SHA256 c1f8c3d8b54aa6a1300b173b4bf81ee768ffd9396ef3e4ce4c1454ef32a7ed00 +EBUILD update-motd-3.5.ebuild 654 RMD160 7e29fbf36a30275d24de614de18ba392e8bdcda1 SHA1 d63436d6d9c0339dbd6d2a647eb59725516c53c7 SHA256 b8c8b951889e9509f861418e7c4d682586b86bb17308c3b08c3a12fbb9773244 diff --git a/app-admin/update-motd/update-motd-3.5.ebuild b/app-admin/update-motd/update-motd-3.5.ebuild new file mode 100644 index 0000000..f14a0f5 --- /dev/null +++ b/app-admin/update-motd/update-motd-3.5.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +inherit eutils + +DESCRIPTION="dynamic update for the motd file" +HOMEPAGE="http://bazaar.launchpad.net/~kirkland/update-motd/main" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="" +RESTRICT="mirror" + +S="${WORKDIR}/${PN}_${PV}.orig" + +SRC_URI_BASE="mirror://ubuntu/pool/main/${PN:0:1}/${PN}/" +SRC_URI="${SRC_URI_BASE}${PN}_${PV}.orig.tar.gz" + +DEPEND="" +RDEPEND="sys-apps/debianutils" +PDEPEND="app-admin/motd-base" + +src_install() { + dobin update-motd + insinto /etc/profile.d + doins update-motd.sh + + doman update-motd.1 + + dodoc README THANKS + + keepdir /etc/update-motd.d +}