# --- 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 - 2003 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}" ; z="/" if [ -f "${y//_/$z}" ] then echo "Found old ${y//_/$z} (don't overwrite)." touch "${y//_/$z}" else cp -v "$confdir/$x" "${y//_/$z}" fi done [ -f etc/HOSTNAME ] || echo localhost > etc/HOSTNAME chmod +x etc/initscript etc/rc.d/rc 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 "Installing the stone setup tool ..." cp -v $confdir/stone.sh usr/sbin/stone chmod +x usr/sbin/stone for x in $( cd $confdir ; echo stone_*.sh ) ; do cp -v $confdir/$x etc/stone.d/${x#stone_} done echo "Installing the rock-net tool ..." cp -v $confdir/rocknet.sh etc/network/rocknet chmod +x etc/network/rocknet for x in $( cd $confdir ; echo rocknet_*.sh ) ; do dst="${x#rocknet_}" ; z="/" dst="${dst//_/$z}" cp -vf $confdir/$x etc/network/$dst done cp -vf $confdir/ifup.sh sbin/ifup ; chmod +x sbin/ifup ln -sf ifup sbin/ifdown 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 etc/skel/.profile and etc/skel/.exrc ..." cp $confdir/skel-profile.txt etc/skel/.profile echo 'set showmode' > etc/skel/.exrc 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 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 hwscan ..." cp -v $confdir/hwscan.awk $root/sbin/hwscan chmod +x $root/sbin/hwscan echo "Installing 'system' init script ..." install_init system $confdir/system.init echo "Installing 'network' init script ..." install_init network $confdir/network.init 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 ] && pkgcheck "$y" "X" then . $x; fi done fi ; true } custmain="main_sf" autoextract=0 check_usrlocal=0