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.

97 lines
2.7 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 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. if [ -f $base/target/$target/version.txt ]; then
  62. cp -f $base/target/$target/version.txt etc/VERSION
  63. else
  64. cp -f etc/SDE-VERSION etc/VERSION
  65. fi
  66. cp -r $base/config/$config/. etc/SDE-CONFIG
  67. echo "Installing btee ..."
  68. cmd="$CC -Wall -O2 $confdir/btee.c -o $root/sbin/btee"
  69. echo "$cmd" ; $cmd
  70. if atstage native; then
  71. echo "Running postsysfiles.in scripts ..."
  72. for x in $base/misc/*/postsysfiles.in
  73. do [ -f $x ] && . $x ; done
  74. for x in $base/package/*/*/postsysfiles.in
  75. do
  76. y=${x%/*}; y=${y##*/}
  77. if [ -f $x ] && pkginstalled "$y"
  78. then . $x; fi
  79. done
  80. fi ; true
  81. }
  82. custmain="main_sf"
  83. srctar=none
  84. autoextract=0
  85. check_usrlocal=0