add dynamic motd generator

git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/genlink@2634 6952d904-891a-0410-993b-d76249ca496b
This commit is contained in:
geos_one 2010-10-31 13:20:29 +00:00
parent b2304cadfc
commit 9bae6d0d35
11 changed files with 114 additions and 13 deletions

View File

@ -1,10 +1,12 @@
#!/bin/sh #!/bin/sh
# link the kernel and initrd for the inital package
cd /boot cd /boot
ln -sf uImage-*.buffalo uImage.buffalo ln -sf uImage-*.buffalo uImage.buffalo
ln -sf initrd-*.buffalo initrd.buffalo ln -sf initrd-*.buffalo initrd.buffalo
# no search for .svn dir # no search for .svn dir
# as a subversiontree is used for /etc/portage & /var/lib/layman/go-genlink # subversiontrees are used for /etc/portage & /var/lib/layman/go-genlink
# so remove by hand # so remove manually
rm -rf /.svn rm -rf /.svn
rm -rf /etc/.svn rm -rf /etc/.svn
rm -rf /etc/conf.d/.svn rm -rf /etc/conf.d/.svn
@ -17,13 +19,23 @@ rm -rf /usr/.svn
rm -rf /usr/local/.svn rm -rf /usr/local/.svn
rm -rf /usr/local/bin/.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 rm -f /etc/portage/package.mask/coreutils
emerge --sync # clean all not needed packages
# shrink the image by removing most of the /usr/portage dir emerge --depclean
# the only dirs that survive are licenses (not requred), profile (required), virtual (not required)
rm -rf /usr/portage/*-*
# 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 /usr/local/bin/changepassword root goLsProLive

View File

@ -12,17 +12,17 @@ ACCEPT_KEYWORDS="arm ~arm"
# CXXFLAGS="${CFLAGS}" # CXXFLAGS="${CFLAGS}"
# CPPFLAGS="${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 \ clamd maildir php posix postfix pam glibc-omitfp \
procmail samba sasl slang softquota symlink tokenizer usb \ procmail samba sasl slang softquota symlink tokenizer usb \
-oss -branding -esd xine mp3 gnutls cups ppds \ -oss -branding -esd xine mp3 gnutls cups ppds \
foomatic-db alsa hal gimpprint freetype X unicode rdesktop pda \ foomatic-db alsa hal gimpprint freetype X unicode rdesktop pda \
zeroconf xinerama java sqlite\ zeroconf xinerama java sqlite\
sms quotas dvb xprint theora ogg a52 matroska v4l xvid network \ 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 \ musepack new-login kerberos dbus openexr aac fat hfs jfs xfs \
ntfs reiserfs cjk cdda dts imap cairo sysfs xpm nptl nptlonly \ 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 \ 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 \ udev cdr dvi libnotify bzip2 aalib mng cddb -beagle -gnome -evo mono \
-eds png gif -qt4 inotify graphite \ -eds png gif -qt4 inotify graphite \

View File

@ -22,5 +22,4 @@
*app-admin/showconsole *app-admin/showconsole
*sys-libs/timezone-data *sys-libs/timezone-data
*net-misc/dhcpcd *net-misc/dhcpcd
*sys-apps/micro_evtd *sys-apps/micro_evtd
*app-misc/linux-logo

View File

@ -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

View File

@ -0,0 +1,4 @@
#!/bin/sh
uname -a
printf "%s\n" "$(lsb_release -s -d)"

View File

@ -0,0 +1,5 @@
#!/bin/sh
echo
echo "Welcome to Gentoo Linux!"
echo " * Documentation: http://www.gentoo.org"

View File

@ -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

View File

@ -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

View File

@ -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/*
}

View File

@ -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

View File

@ -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
}