|
|
# --- ROCK-COPYRIGHT-NOTE-BEGIN --- # # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # Please add additional copyright information _after_ the line containing # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by # the ./scripts/Create-CopyPatch script. Do not edit this copyright text! # # ROCK Linux: rock-src/package/base/sysfiles/sysfiles.conf # ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf # # 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. A copy of the GNU General Public # License can be found at Documentation/COPYING. # # Many people helped and are helping developing ROCK Linux. Please # have a look at http://www.rocklinux.org/ and the Documentation/TEAM # file for details. # # --- ROCK-COPYRIGHT-NOTE-END ---
main_sf() { local services cd $root/
echo "Creating various etc/* files ..." for x in $( cd $confdir ; echo etc_*.txt ) ; do y="${x%.txt}" ; y="${y//_//}" if [ -f "${y}" ] then echo "Found old ${y} (don't overwrite)." touch "${y}" else cp -v "$confdir/$x" "${y}" fi done
chmod +x etc/initscript etc/rc.d/rc etc/rc.d/sysinit
echo "Add missing entries to etc/services ..." services=$( echo "$desc_D" | egrep 'services[^ ]*.txt' | \ tr ' ' '\t' | tr -s '\t' | cut -f2 ) { echo -e '\n# Entries from http://www.graffiti.com/services\n#' while read line ; do prot=`echo $line | cut -f2 -d' '` grep -q " $prot " $root/etc/services || echo "$line" done < $archdir/$services } >> $root/etc/services
echo "Creating usr/sbin/sysnote ..." cat > usr/sbin/sysnote << EOT #!/bin/sh ${EDITOR:-vi} /etc/conf/NOTE chmod 600 /etc/conf/NOTE chown 0:0 /etc/conf/NOTE EOT chmod +x usr/sbin/sysnote
echo "Create /etc/issue, /etc/issue.ansi and /etc/issue.net ... " rocktxt="ROCK Linux $rockver $arch" . $confdir/issue-std.sh . $confdir/$ROCKCFG_SYSFILE_ANSI_ISSUE . $confdir/issue-net.sh
echo "Set ownership and permissions ... " chmod 640 etc/shadow chown 0:3 etc/shadow chmod 750 etc/rc.d touch var/log/wtmp var/run/utmp chmod 664 var/log/wtmp var/run/utmp chown 0:5 var/log/wtmp var/run/utmp
echo "Creating etc/mtab ..." # ln -fvs ../proc/mounts etc/mtab touch etc/mtab
echo "Creating example etc/skel/.profile ..." cp $confdir/skel-profile.txt etc/skel/.profile
echo "Creating etc/VERSION, etc/ROCK-VERSION and etc/ROCK-CONFIG ..." echo "ROCK Linux $rockver (`date +%Y/%m/%d`)" > etc/ROCK-VERSION ln -sf ROCK-VERSION etc/VERSION ; rm -rf etc/ROCK-CONFIG cp -r $base/config/$config/. etc/ROCK-CONFIG sed -i -e "s,ROCKCFG_SRC_TMPFS='.',ROCKCFG_SRC_TMPFS='0',g" etc/ROCK-CONFIG/config
echo "Installing btee ..." cmd="$CC -Wall -O2 $confdir/btee.c -o $root/sbin/btee" echo "$cmd" ; $cmd
echo "Installing rc ..." cmd="$CC -Wall -O2 $confdir/rc.c -o $root/sbin/rc" echo "$cmd" ; $cmd
echo "Installing mkpkg and helpers ..." cmd="$CC -Wall -O2 $base/misc/tools-source/fl_stparse.c -o $root/usr/lib/fl_stparse" echo "$cmd" ; $cmd cmd="$CC -Wall -O2 $base/misc/tools-source/fl_wrparse.c -o $root/usr/lib/fl_wrparse" echo "$cmd" ; $cmd cp $confdir/mkpkg.sh $root/usr/sbin/mkpkg chmod +x $root/usr/sbin/mkpkg
echo "Installing postinstall ..." cp -v $confdir/sbin_postinstall.sh $root/usr/sbin/postinstall chmod +x $root/usr/sbin/postinstall
for x in console devfs localfs swap system system-state do echo "Installing '$x' init script ..." install_init $x $confdir/$x.init done
echo "Exporting LINGUAS environment variable ..." if [ "$ROCKCFG_LINGUAS" == "all" ] ; then echo "# export LINGUAS=" > $root/etc/profile.d/linguas elif [ "$ROCKCFG_LINGUAS" == "none" ] ; then echo "export LINGUAS=" > $root/etc/profile.d/linguas else echo "export LINGUAS=\"$ROCKCFG_LINGUAS\"" > $root/etc/profile.d/linguas fi
if [ $stagelevel -gt 1 ] ; then echo "Running postsysfiles.in scripts ..." for x in $base/misc/*/postsysfiles.in do [ -f $x ] && . $x ; done for x in $base/package/*/*/postsysfiles.in do y=${x%/*}; y=${y##*/} if [ -f $x ] && pkginstalled "$y" then . $x; fi done fi ; true }
custmain="main_sf" autoextract=0 check_usrlocal=0
|