1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
4 # T2 SDE: package/.../sysfiles/sysfiles.conf
5 # Copyright (C) 2004 - 2017 The T2 SDE Project
6 # Copyright (C) 1998 - 2003 ROCK Linux Project
8 # More information can be found in the files COPYING and README.
10 # This program is free software; you can redistribute it and/or modify
11 # it under the terms of the GNU General Public License as published by
12 # the Free Software Foundation; version 2 of the License. A copy of the
13 # GNU General Public License can be found in the file COPYING.
14 # --- T2-COPYRIGHT-NOTE-END ---
20 echo "Creating various etc/* files ..."
21 for x in $( cd $confdir; echo etc_*.txt ); do
23 if [ -f "${y//_/$z}" ]; then
24 echo "Found old ${y//_/$z} (don't overwrite)."
27 cp -v "$confdir/$x" "${y//_/$z}"
30 [ -f etc/HOSTNAME ] || echo localhost > etc/HOSTNAME
31 chmod +x etc/initscript etc/rc.d/rc
33 echo "Add missing entries to etc/services .."
34 services=`match_source_file -p services`
35 { echo -e '\n# Entries from http://www.graffiti.com/services\n#'
37 prot=`echo $line | cut -f2 -d' '`
38 grep -q " $prot " $root/etc/services || echo "$line"
40 } >> $root/etc/services
42 echo "Creating usr/sbin/sysnote ..."
43 cat > usr/sbin/sysnote << EOT
45 ${EDITOR:-vi} /etc/conf/NOTE
46 chmod 600 /etc/conf/NOTE
47 chown 0:0 /etc/conf/NOTE
49 chmod +x usr/sbin/sysnote
51 echo "Create /etc/issue, /etc/issue.ansi and /etc/issue.net ... "
52 sdetxt="#t2sde $sdever $arch"
53 . $confdir/issue-std.sh
54 . $confdir/issue-ansi.sh
55 . $confdir/issue-net.sh
57 echo "Set ownership and permissions ... "
61 touch var/log/wtmp var/run/utmp
62 chmod 664 var/log/wtmp var/run/utmp
63 chown 0:5 var/log/wtmp var/run/utmp
65 echo "Creating etc/mtab ..."
66 # ln -fvs ../proc/mounts etc/mtab
69 echo "Creating etc/crypttab ..."
72 echo "Creating etc/skel/.profile and etc/skel/.exrc ..."
73 cp $confdir/skel-profile.txt etc/skel/.profile
74 echo 'set showmode' > etc/skel/.exrc
76 echo "Creating etc/VERSION, etc/SDE-VERSION and etc/SDE-CONFIG ..."
77 rm -f etc/{ROCK-,SDE-,}VERSION
78 rm -rf etc/{ROCK,SDE}-CONFIG
79 echo "T2 SDE $sdever (`date +%Y/%m/%d`)" > etc/SDE-VERSION
80 if [ -f $base/target/$target/version.txt ]; then
81 cp -f $base/target/$target/version.txt etc/VERSION
83 cp -f etc/SDE-VERSION etc/VERSION
85 cp -r $base/config/$config/. etc/SDE-CONFIG
87 echo "Installing btee ..."
88 $CC -Wall $confdir/btee.c -o $root/sbin/btee
90 echo "Running postsysfiles.in scripts ..."
91 for x in $base/misc/*/postsysfiles.in; do
94 for x in $base/package/*/*/postsysfiles.in; do
96 if [ -f $x ] && pkginstalled "$y"; then
106 hook_add inmake 5 main_sf