Créé répertoire de configuration
[hvlinux.git] / stage1 / create-config-files
index 1dad392..bf8780c 100755 (executable)
@@ -1,10 +1,9 @@
-#!/bin/sh
-set -o errexit
+#!/bin/bash
 
 # Reading system configuration informations, functions and package versions.
-source ../sysinfos
+source ../config/sysinfos
 source ../functions
-source ../packages-list
+source ../config/packages-list
 
 echo "Creating /etc/fstab"
 cat > ${LFS}/etc/fstab << "EOF"
@@ -20,9 +19,14 @@ if [ -n "${SWAP_PARTITION}" ]; then
 fi
 echo "${LFS_PARTITION}  /                 reiserfs defaults,noatime 0 0" >> ${LFS}/etc/fstab
 
-cat >> ${LFS}/etc/fstab << "EOF"
+if [ -n "${CDROM}" ]; then
+    cat >> ${LFS}/etc/fstab << "EOF"
 /dev/cdrom        /media/cdrom      auto     ro,noauto,users  0 0
 /dev/dvd          /media/dvd        auto     ro,noauto,users  0 0
+EOF
+fi
+
+cat >> ${LFS}/etc/fstab << "EOF"
 proc              /proc             proc     defaults         0 0
 sysfs             /sys              sysfs    defaults         0 0
 devpts            /dev/pts          devpts   gid=4,mode=620   0 0
@@ -32,7 +36,7 @@ EOF
 echo "Creating basic /etc/profile and /etc/profile.d"
 install -v -m755 -d ${LFS}/etc/profile.d
 cat > ${LFS}/etc/profile << "EOF"
-#!/bin/sh
+#!/bin/bash
 # /etc/profile
 
 # System-wide environment and startup programs.
@@ -88,7 +92,7 @@ sed -i -e "s!_DEFAULT_EDITOR_!${DEFAULT_EDITOR}!g" ${LFS}/etc/profile
 
 echo "Creating /etc/bashrc"
 cat > ${LFS}/etc/bashrc << "EOF"
-#!/bin/sh
+#!/bin/bash
 
 # /etc/bashrc