You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

93 lines
2.6 KiB

# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../sysfiles/sysfiles.conf
# Copyright (C) 2007 - 2008 The OpenSDE Project
# Copyright (C) 2004 - 2006 The T2 SDE Project
# Copyright (C) 1998 - 2003 Clifford Wolf
#
# More information can be found in the files COPYING and README.
#
# 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; version 2 of the License. A copy of the
# GNU General Public License can be found in the file COPYING.
# --- SDE-COPYRIGHT-NOTE-END ---
main_sf() {
cd $root/
echo "Creating various etc/* files ..."
overlay_apply -n "$confdir/overlay.d"
[ -f etc/HOSTNAME ] || echo localhost > etc/HOSTNAME
chmod +x etc/initscript etc/rc.d/rc
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="OpenSDE $sdever $arch"
. $confdir/issue-std.sh
. $confdir/$SDECFG_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/SDE-VERSION and etc/SDE-CONFIG ..."
rm -f etc/{ROCK-,SDE-,}VERSION
rm -rf etc/{ROCK,SDE}-CONFIG
echo "OpenSDE $sdever (`date +%Y/%m/%d`)" > etc/SDE-VERSION
for x in $( get_expanded $base/target/% $targetchain ); do
for y in version.txt VERSION; do
[ -s "$x/$y" ] || continue
cat "$x/$y" >> etc/VERSION
break
done
done
[ -s etc/VERSION ] || cp -f etc/SDE-VERSION etc/VERSION
cp -r $base/config/$config/. etc/SDE-CONFIG
echo "Installing btee ..."
cmd="$CC -Wall -O2 $confdir/btee.c -o $root/sbin/btee"
echo "$cmd" ; $cmd
if ! atstage toolchain; 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"
srctar=none
autoextract=0
check_usrlocal=0