LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 483|回复: 1

一个头疼的脚本:CONF.sh

[复制链接]
发表于 2005-8-3 18:46:14 | 显示全部楼层 |阅读模式

  1. #
  2. # This file will have to be sourced where needed
  3. #

  4. # Unset all optional variables first to start from a clean state
  5. unset NONUS             || true
  6. unset FORCENONUSONCD1   || true
  7. unset NONFREE           || true
  8. unset CONTRIB           || true
  9. unset EXTRANONFREE      || true
  10. unset LOCAL             || true
  11. unset LOCALDEBS         || true
  12. unset SECURED           || true
  13. unset SECURITY          || true
  14. unset BOOTDIR           || true
  15. unset BOOTDISKS         || true
  16. unset SYMLINK           || true
  17. unset COPYLINK          || true
  18. unset MKISOFS           || true
  19. unset MKISOFS_OPTS      || true
  20. unset ISOLINUX          || true
  21. unset EXCLUDE           || true
  22. unset SRCEXCLUDE        || true
  23. unset NORECOMMENDS      || true
  24. unset NOSUGGESTS        || true
  25. unset DOJIGDO           || true
  26. unset JIGDOCMD          || true
  27. unset JIGDOTEMPLATEURL  || true
  28. unset JIGDOFALLBACKURLS || true
  29. unset JIGDOINCLUDEURLS  || true
  30. unset JIGDOSCRIPT       || true
  31. unset DEFBINSIZE        || true
  32. unset DEFSRCSIZE        || true
  33. unset FASTSUMS          || true
  34. unset PUBLISH_URL       || true
  35. unset PUBLISH_NONUS_URL || true
  36. unset PUBLISH_PATH      || true
  37. unset UDEB_INCLUDE      || true
  38. unset UDEB_EXCLUDE      || true
  39. unset BASE_INCLUDE      || true
  40. unset BASE_EXCLUDE      || true
  41. unset INSTALLER_CD      || true
  42. unset DI_CODENAME       || true
  43. unset MAXCDS            || true
  44. unset SPLASHPNG         || true

  45. # The debian-cd dir
  46. # Where I am (hoping I'm in the debian-cd dir)
  47. export BASEDIR=`pwd`

  48. # Building sarge cd set ...
  49. export CODENAME=sarge

  50. # By default use Debian installer packages from $CODENAME
  51. if [ ! "$DI_CODENAME" ]
  52. then
  53.   export DI_CODENAME=$CODENAME
  54. fi

  55. # If set, controls where the d-i components are downloaded from.
  56. # This may be an url, or "default", which will make it use the default url
  57. # for the daily d-i builds. If not set, uses the official d-i images from
  58. # the Debian mirror.
  59. #export DI_WWW_HOME=default

  60. # Version number, "2.2 r0", "2.2 r1" etc.
  61. export DEBVERSION="3.1"

  62. # Official or non-official set.
  63. # NOTE: THE "OFFICIAL" DESIGNATION IS ONLY ALLOWED FOR IMAGES AVAILABLE
  64. # ON THE OFFICIAL DEBIAN CD WEBSITE [url]http://cdimage.debian.org[/url]
  65. #export OFFICIAL="Unofficial"
  66. #export OFFICIAL="Official"
  67. #export OFFICIAL="Official Beta"
  68. export OFFICIAL="Daniel's Unofficial Debian Sarge (testing)"

  69. # ... for arch  
  70. export ARCH=`dpkg --print-installation-architecture`

  71. # IMPORTANT : The 4 following paths must be on the same partition/device.
  72. #              If they aren't then you must set COPYLINK below to 1. This
  73. #              takes a lot of extra room to create the sandbox for the ISO
  74. #              images, however. Also, if you are using an NFS partition for
  75. #              some part of this, you must use this option.
  76. # Paths to the mirrors
  77. #export MIRROR=/ftp/debian
  78. export MIRROR=/home/archive/cdrom

  79. # Comment the following line if you don't have/want non-US
  80. #export NONUS=/ftp/debian-non-US

  81. # And this option will make you 2 copies of CD1 - one with all the
  82. # non-US packages on it, one with none. Useful if you're likely to
  83. # need both.
  84. #export FORCENONUSONCD1=1

  85. # Path of the temporary directory
  86. #export TDIR=/ftp/tmp
  87. export TDIR=/debian/tmp

  88. # Path where the images will be written
  89. #export OUT=/rack/debian-cd
  90. export OUT=/debian/debian-cd

  91. # Where we keep the temporary apt stuff.
  92. # This cannot reside on an NFS mount.
  93. #export APTTMP=/ftp/tmp/apt
  94. export APTTMP=/debian/tmp-apt

  95. # Do I want to have NONFREE merged in the CD set
  96. # export NONFREE=1

  97. # Do I want to have CONTRIB merged in the CD set
  98. export CONTRIB=1

  99. # Do I want to have NONFREE on a separate CD (the last CD of the CD set)
  100. # WARNING: Don't use NONFREE and EXTRANONFREE at the same time !
  101. # export EXTRANONFREE=1

  102. # If you have a $MIRROR/dists/$CODENAME/local/binary-$ARCH dir with
  103. # local packages that you want to put on the CD set then
  104. # uncomment the following line
  105. # export LOCAL=1

  106. # If your local packages are not under $MIRROR, but somewhere else,
  107. # you can uncomment this line and edit to to point to a directory
  108. # containing dists/$CODENAME/local/binary-$ARCH
  109. # export LOCALDEBS=/home/joey/debian/va/debian

  110. # If you want a <codename>-secured tree with a copy of the signed
  111. # Release.gpg and files listed by this Release file, then
  112. # uncomment this line
  113. # export SECURED=1

  114. # Where to find the security patches.  This directory should be the
  115. # top directory of a security.debian.org mirror.
  116. #export SECURITY="$TOPDIR"/debian/debian-security

  117. # Sparc only : bootdir (location of cd.b and second.b)
  118. # export BOOTDIR=/boot

  119. # Symlink farmers should uncomment this line :
  120. # export SYMLINK=1

  121. # Use this to force copying the files instead of symlinking or hardlinking
  122. # them. This is useful if your destination directories are on a different
  123. # partition than your source files.
  124. # export COPYLINK=1

  125. # Options
  126. # export MKISOFS=/usr/bin/mkisofs
  127. # export MKISOFS_OPTS="-r"                #For normal users
  128. # export MKISOFS_OPTS="-r -F ."        #For symlink farmers

  129. # ISOLinux support for multiboot on CD1 for i386
  130. export ISOLINUX=1

  131. # uncomment this to if you want to see more of what the Makefile is doing
  132. #export VERBOSE_MAKE=1

  133. # uncoment this to make build_all.sh try to build a simple CD image if
  134. # the proper official CD run does not work
  135. #ATTEMPT_FALLBACK=yes

  136. # Set your disk size here in MB. Used in calculating package and
  137. # source file layouts in build.sh and build_all.sh. Defaults are for
  138. # CD-R, try ~4600 for DVD-R.
  139. export DEFBINSIZE=630
  140. export DEFSRCSIZE=635

  141. # We don't want certain packages to take up space on CD1...
  142. export EXCLUDE="$BASEDIR"/tasks/exclude-sarge
  143. # ...but they are okay for other CDs (UNEXCLUDEx == may be included on CD >= x)
  144. export UNEXCLUDE2="$BASEDIR"/tasks/unexclude-CD2-sarge
  145. # Any packages listed in EXCLUDE but not in any UNEXCLUDE will be
  146. # excluded completely.

  147. # We also exclude some source packages
  148. #export SRCEXCLUDE="$BASEDIR"/tasks/exclude-src-potato

  149. # Set this if the recommended packages should be skipped when adding
  150. # package on the CD.  The default is 'false'.
  151. export NORECOMMENDS=1

  152. # Set this if the suggested packages should be skipped when adding
  153. # package on the CD.  The default is 'true'.
  154. #export NOSUGGESTS=1

  155. # Produce jigdo files:
  156. # 0/unset = Don't do jigdo at all, produce only the full iso image.
  157. # 1 = Produce both the iso image and jigdo stuff.
  158. # 2 = Produce ONLY jigdo stuff by piping mkisofs directly into jigdo-file,
  159. #     no temporary iso image is created (saves lots of disk space).
  160. #     NOTE: The no-temp-iso will not work for (at least) alpha and powerpc
  161. #     since they need the actual .iso to make it bootable. For these archs,
  162. #     the temp-iso will be generated, but deleted again immediately after the
  163. #     jigdo stuff is made; needs temporary space as big as the biggest image.
  164. #export DOJIGDO=2
  165. #
  166. # jigdo-file command & options
  167. # Note: building the cache takes hours, so keep it around for the next run
  168. #export JIGDOCMD="/usr/local/bin/jigdo-file --cache=$HOME/jigdo-cache.db"
  169. #
  170. # HTTP/FTP URL for directory where you intend to make the templates
  171. # available. You should not need to change this; the default value ""
  172. # means "template in same dir as the .jigdo file", which is usually
  173. # correct. If it is non-empty, it needs a trailing slash. "%ARCH%"
  174. # will be substituted by the current architecture.
  175. #export JIGDOTEMPLATEURL=""
  176. #
  177. # Name of a directory on disc to create data for a fallback server in.
  178. # Should later be made available by you at the URL given in
  179. # JIGDOFALLBACKURLS. In the directory, two subdirs named "Debian" and
  180. # "Non-US" will be created, and filled with hard links to the actual
  181. # files in your FTP archive. Because of the hard links, the dir must
  182. # be on the same partition as the FTP archive! If unset, no fallback
  183. # data is created, which may cause problems - see README.
  184. #export JIGDOFALLBACKPATH="$(OUT)/snapshot/"
  185. #
  186. # Space-separated list of label->URL mappings for "jigdo fallback
  187. # server(s)" to add to .jigdo file. If unset, no fallback URL is
  188. # added, which may cause problems - see README.
  189. #export JIGDOFALLBACKURLS="Debian=http://myserver/snapshot/Debian/ Non-US=http://myserver/snapshot/Non-US/"
  190. #
  191. # Space-separated list of "include URLs" to add to the .jigdo file.
  192. # The included files are used to provide an up-to-date list of Debian
  193. # mirrors to the jigdo _GUI_application_ (_jigdo-lite_ doesn't support
  194. # "[Include ...]").
  195. export JIGDOINCLUDEURLS="http://cdimage.debian.org/debian-cd/debian-servers.jigdo"
  196. #
  197. # $JIGDOTEMPLATEURL and $JIGDOINCLUDEURLS are passed to
  198. # "tools/jigdo_header", which is used by default to generate the
  199. # [Image] and [Servers] sections of the .jigdo file. You can provide
  200. # your own script if you need the .jigdo file to contain different
  201. # data.
  202. #export JIGDOSCRIPT="myscript"

  203. # If set, use the md5sums from the main archive, rather than calculating
  204. # them locally
  205. #export FASTSUMS=1

  206. # A couple of things used only by publish_cds, so it can tweak the
  207. # jigdo files, and knows where to put the results.
  208. # You need to run publish_cds manually, it is not run by the Makefile.
  209. export PUBLISH_URL="http://cdimage.debian.org/jigdo-area"
  210. export PUBLISH_NONUS_URL="http://non-US.cdimage.debian.org/jigdo-area"
  211. export PUBLISH_PATH="/home/jigdo-area/"

  212. # Where to find the boot disks
  213. #export BOOTDISKS=$TOPDIR/ftp/skolelinux/boot-floppies

  214. # File with list of packages to include when fetching modules for the
  215. # first stage installer (debian-installer). One package per line.
  216. # Lines starting with '#' are comments.  The package order is
  217. # important, as the packages will be installed in the given order.
  218. #export UDEB_INCLUDE="$BASEDIR"/data/$CODENAME/udeb_include

  219. # File with list of packages to exclude as above.
  220. #export UDEB_EXCLUDE="$BASEDIR"/data/$CODENAME/udeb_exclude

  221. # File with list of packages to include when running debootstrap from
  222. # the first stage installer (currently only supported in
  223. # debian-installer). One package per line.  Lines starting with '#'
  224. # are comments.  The package order is important, as the packages will
  225. # be installed in the given order.
  226. #export BASE_INCLUDE="$BASEDIR"/data/$CODENAME/base_include

  227. # File with list of packages to exclude as above.
  228. #export BASE_EXCLUDE="$BASEDIR"/data/$CODENAME/base_exclude

  229. # Only put the installer onto the cd (set NORECOMMENDS,... as well).
  230. # INSTALLER_CD=0: nothing special (default)
  231. # INSTALLER_CD=1: just add debian-installer (use TASK=tasks/debian-installer-$CODENAME)
  232. # INSTALLER_CD=2: add d-i and base (use TASK=tasks/debian-installer+kernel-$CODENAME)
  233. #export INSTALLER_CD=0
  234. export INSTALLER_CD=1

  235. # Parameters to pass to kernel when the CD boots. Not currently supported
  236. # for all architectures.
  237. #export KERNEL_PARAMS="DEBCONF_PRIORITY=critical"

  238. # If set, limits the number of binary CDs to produce.
  239. #export MAXCDS=1

  240. # If set, overrides the boot picture used.
  241. #export SPLASHPNG="$BASEDIR/data/$CODENAME/splash-img.png"

  242. # Used by build.sh to determine what to build, this is the name of a target
  243. # in the Makefile. Use bin-official_images to build only binary CDs. The
  244. # default, official_images, builds everything.
  245. #IMAGETARGET=official_images

复制代码


运行时如下:

debian:/usr/share/debian-cd#CONF.sh

在运行

debian:/usr/share/debian-cd# make distclean

结果为:
Makefile:193: warning: overriding commands for target `/-'
Makefile:189: warning: ignoring old commands for target `/-'
DIR undefined -- set up CONF.sh
make: *** [ok] Error 1


进行多次修改后仍不能正确运行,显示结果均如上,请帮忙!
发表于 2005-8-5 12:03:37 | 显示全部楼层

  1. sh -xv CONF.sh 2>&1|tee /tmp/somefie.log
复制代码

用debug模式来运行,将信息写到文件,然后再仔细查询log文件的出错信息。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表