OpenSDE Packages Database (without history before r20070)
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.

101 lines
2.8 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../sysfiles/sysfiles.conf
  5. # Copyright (C) 2007 - 2008 The OpenSDE Project
  6. # Copyright (C) 2004 - 2006 The T2 SDE Project
  7. # Copyright (C) 1998 - 2003 Clifford Wolf
  8. #
  9. # More information can be found in the files COPYING and README.
  10. #
  11. # This program is free software; you can redistribute it and/or modify
  12. # it under the terms of the GNU General Public License as published by
  13. # the Free Software Foundation; version 2 of the License. A copy of the
  14. # GNU General Public License can be found in the file COPYING.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. main_sf() {
  17. cd $root/
  18. echo "Creating various etc/* files ..."
  19. for x in $( cd $confdir ; echo etc_*.txt ) ; do
  20. y="${x%.txt}" ; z="/"
  21. if [ -f "${y//_/$z}" ]
  22. then
  23. echo "Found old ${y//_/$z} (don't overwrite)."
  24. touch "${y//_/$z}"
  25. else
  26. cp -v "$confdir/$x" "${y//_/$z}"
  27. fi
  28. done
  29. [ -f etc/HOSTNAME ] || echo localhost > etc/HOSTNAME
  30. chmod +x etc/initscript etc/rc.d/rc
  31. echo "Creating usr/sbin/sysnote ..."
  32. cat > usr/sbin/sysnote << EOT
  33. #!/bin/sh
  34. ${EDITOR:-vi} /etc/conf/NOTE
  35. chmod 600 /etc/conf/NOTE
  36. chown 0:0 /etc/conf/NOTE
  37. EOT
  38. chmod +x usr/sbin/sysnote
  39. echo "Create /etc/issue, /etc/issue.ansi and /etc/issue.net ... "
  40. rocktxt="OpenSDE $sdever $arch"
  41. . $confdir/issue-std.sh
  42. . $confdir/$SDECFG_SYSFILE_ANSI_ISSUE
  43. . $confdir/issue-net.sh
  44. echo "Set ownership and permissions ... "
  45. chmod 640 etc/shadow
  46. chown 0:3 etc/shadow
  47. chmod 750 etc/rc.d
  48. touch var/log/wtmp var/run/utmp
  49. chmod 664 var/log/wtmp var/run/utmp
  50. chown 0:5 var/log/wtmp var/run/utmp
  51. echo "Creating etc/mtab ..."
  52. # ln -fvs ../proc/mounts etc/mtab
  53. touch etc/mtab
  54. echo "Creating etc/skel/.profile and etc/skel/.exrc ..."
  55. cp $confdir/skel-profile.txt etc/skel/.profile
  56. echo 'set showmode' > etc/skel/.exrc
  57. echo "Creating etc/VERSION, etc/SDE-VERSION and etc/SDE-CONFIG ..."
  58. rm -f etc/{ROCK-,SDE-,}VERSION
  59. rm -rf etc/{ROCK,SDE}-CONFIG
  60. echo "OpenSDE $sdever (`date +%Y/%m/%d`)" > etc/SDE-VERSION
  61. for x in $( get_expanded $base/target/% $targetchain ); do
  62. for y in version.txt VERSION; do
  63. [ -s "$x/$y" ] || continue
  64. cat "$x/$y" >> etc/VERSION
  65. break
  66. done
  67. done
  68. [ -s etc/VERSION ] || cp -f etc/SDE-VERSION etc/VERSION
  69. cp -r $base/config/$config/. etc/SDE-CONFIG
  70. echo "Installing btee ..."
  71. cmd="$CC -Wall -O2 $confdir/btee.c -o $root/sbin/btee"
  72. echo "$cmd" ; $cmd
  73. if ! atstage toolchain; then
  74. echo "Running postsysfiles.in scripts ..."
  75. for x in $base/misc/*/postsysfiles.in
  76. do [ -f $x ] && . $x ; done
  77. for x in $base/package/*/*/postsysfiles.in
  78. do
  79. y=${x%/*}; y=${y##*/}
  80. if [ -f $x ] && pkginstalled "$y"
  81. then . $x; fi
  82. done
  83. fi ; true
  84. }
  85. custmain="main_sf"
  86. srctar=none
  87. autoextract=0
  88. check_usrlocal=0