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.

98 lines
2.7 KiB

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