Turn to silent some commands

This commit is contained in:
Jeremy Gardais 2018-02-14 10:56:23 +01:00
parent c985da0564
commit 987315a355
5 changed files with 48 additions and 33 deletions

View File

@ -11,7 +11,7 @@ else
fi fi
if ! command -v unzip > /dev/null; then if ! command -v unzip > /dev/null; then
apt install unzip apt -y install unzip
fi fi
CZ_INSTALLER_DIR="${TFTP_DIRECTORY}/installer/clonezilla" CZ_INSTALLER_DIR="${TFTP_DIRECTORY}/installer/clonezilla"
@ -29,14 +29,16 @@ for ARCH in amd64 i686; do # For available classic architecture
# Create and go into directory # Create and go into directory
mkdir -p ${CZ_INSTALLER_DIR}/${ARCH} mkdir -p ${CZ_INSTALLER_DIR}/${ARCH}
pushd ${CZ_INSTALLER_DIR}/${ARCH} pushd ${CZ_INSTALLER_DIR}/${ARCH} > /dev/null
# Download and extract only PXE files # Download and extract only PXE files
wget "${CZ_URL}" -O "${CZ_TEMP_FILE}" #wget "${CZ_URL}" -O "${CZ_TEMP_FILE}"
unzip -j "${CZ_TEMP_FILE}" live/vmlinuz live/initrd.img live/filesystem.squashfs -d . wget --quiet "${CZ_URL}" -O "${CZ_TEMP_FILE}"
#unzip -j "${CZ_TEMP_FILE}" live/vmlinuz live/initrd.img live/filesystem.squashfs -d .
unzip -q -j "${CZ_TEMP_FILE}" live/vmlinuz live/initrd.img live/filesystem.squashfs -d .
rm -f "${CZ_TEMP_FILE}" rm -f "${CZ_TEMP_FILE}"
popd popd > /dev/null
# Config file # Config file
/bin/cat >> "${CZ_CONFIG_PXE}" << EOF /bin/cat >> "${CZ_CONFIG_PXE}" << EOF

View File

@ -27,12 +27,14 @@ for DISTRO in stretch buster jessie wheezy sid; do # For ALL Debian's version
# Create and go into directory # Create and go into directory
mkdir -p ${DEBIAN_INSTALLER_DIR}/${DISTRO}/${ARCH} mkdir -p ${DEBIAN_INSTALLER_DIR}/${DISTRO}/${ARCH}
pushd ${DEBIAN_INSTALLER_DIR}/${DISTRO}/${ARCH} pushd ${DEBIAN_INSTALLER_DIR}/${DISTRO}/${ARCH} > /dev/null
# Download files # Download files
wget http://ftp.fr.debian.org/debian/dists/${DISTRO}/main/installer-${ARCH}/current/images/netboot/debian-installer/${ARCH}/linux -O linux #wget http://ftp.fr.debian.org/debian/dists/${DISTRO}/main/installer-${ARCH}/current/images/netboot/debian-installer/${ARCH}/linux -O linux
wget http://ftp.fr.debian.org/debian/dists/${DISTRO}/main/installer-${ARCH}/current/images/netboot/debian-installer/${ARCH}/initrd.gz -O initrd.gz #wget http://ftp.fr.debian.org/debian/dists/${DISTRO}/main/installer-${ARCH}/current/images/netboot/debian-installer/${ARCH}/initrd.gz -O initrd.gz
popd wget --quiet http://ftp.fr.debian.org/debian/dists/${DISTRO}/main/installer-${ARCH}/current/images/netboot/debian-installer/${ARCH}/linux -O linux
wget --quiet http://ftp.fr.debian.org/debian/dists/${DISTRO}/main/installer-${ARCH}/current/images/netboot/debian-installer/${ARCH}/initrd.gz -O initrd.gz
popd > /dev/null
# Config file # Config file
/bin/cat >> "${DEBIAN_CONFIG_PXE}" << EOF /bin/cat >> "${DEBIAN_CONFIG_PXE}" << EOF

View File

@ -11,7 +11,7 @@ fi
if ! command -v unzip > /dev/null; then if ! command -v unzip > /dev/null; then
apt install unzip apt -y install unzip
fi fi
### Memtest {{{ ### Memtest {{{
@ -22,17 +22,18 @@ MEMTEST_INSTALLER_DIR="${TFTP_DIRECTORY}/installer/memtest/"
# (re)Create the installer directory # (re)Create the installer directory
rm -rf ${MEMTEST_INSTALLER_DIR} rm -rf ${MEMTEST_INSTALLER_DIR}
mkdir -p ${MEMTEST_INSTALLER_DIR} mkdir -p ${MEMTEST_INSTALLER_DIR}
pushd ${MEMTEST_INSTALLER_DIR} pushd ${MEMTEST_INSTALLER_DIR} > /dev/null
# Config file # Config file
CONFIG_PXE="${TFTP_DIRECTORY}/installer/menu.cfg.diag.example" CONFIG_PXE="${TFTP_DIRECTORY}/installer/menu.cfg.diag.example"
rm -f ${CONFIG_PXE} && touch ${CONFIG_PXE} rm -f ${CONFIG_PXE} && touch ${CONFIG_PXE}
# Download the last version and set simpler name (without the **.bin** extension!) # Download the last version and set simpler name (without the **.bin** extension!)
wget ${MEMTEST_URL} -O - | gzip -d > memtest86+-${MEMTEST_VERSION}.bin #wget ${MEMTEST_URL} -O - | gzip -d > memtest86+-${MEMTEST_VERSION}.bin
wget --quiet ${MEMTEST_URL} -O - | gzip -d > memtest86+-${MEMTEST_VERSION}.bin
ln -s memtest86+-${MEMTEST_VERSION}.bin memtest86+ ln -s memtest86+-${MEMTEST_VERSION}.bin memtest86+
popd popd > /dev/null
# Config file # Config file
/bin/cat >> "${CONFIG_PXE}" << EOF /bin/cat >> "${CONFIG_PXE}" << EOF
@ -57,14 +58,16 @@ for ARCH in amd64 i686; do # For available classic architecture
# Create and go into directory # Create and go into directory
mkdir -p ${GPARTED_INSTALLER_DIR}/${ARCH} mkdir -p ${GPARTED_INSTALLER_DIR}/${ARCH}
pushd ${GPARTED_INSTALLER_DIR}/${ARCH} pushd ${GPARTED_INSTALLER_DIR}/${ARCH} > /dev/null
# Download and extract only PXE files # Download and extract only PXE files
wget "${GPARTED_URL}" -O "${GPARTED_TEMP_FILE}" #wget "${GPARTED_URL}" -O "${GPARTED_TEMP_FILE}"
unzip -j "${GPARTED_TEMP_FILE}" live/filesystem.squashfs live/initrd.img live/vmlinuz -d . wget --quiet "${GPARTED_URL}" -O "${GPARTED_TEMP_FILE}"
#unzip -j "${GPARTED_TEMP_FILE}" live/filesystem.squashfs live/initrd.img live/vmlinuz -d .
unzip -q -j "${GPARTED_TEMP_FILE}" live/filesystem.squashfs live/initrd.img live/vmlinuz -d .
rm -f "${GPARTED_TEMP_FILE}" rm -f "${GPARTED_TEMP_FILE}"
popd popd > /dev/null
/bin/cat >> "${CONFIG_PXE}" << EOF /bin/cat >> "${CONFIG_PXE}" << EOF
label gpartedlive${ARCH} label gpartedlive${ARCH}

View File

@ -17,10 +17,12 @@ LTS="xenial"
for DISTRO in artful ${LTS}; do for DISTRO in artful ${LTS}; do
for ARCH in amd64 i386; do for ARCH in amd64 i386; do
mkdir -p ${TFTP_DIRECTORY}/installer/ubuntu/${DISTRO}/${ARCH} mkdir -p ${TFTP_DIRECTORY}/installer/ubuntu/${DISTRO}/${ARCH}
pushd ${TFTP_DIRECTORY}/installer/ubuntu/${DISTRO}/${ARCH} pushd ${TFTP_DIRECTORY}/installer/ubuntu/${DISTRO}/${ARCH} > /dev/null
wget http://fr.archive.ubuntu.com/ubuntu/dists/${DISTRO}/main/installer-${ARCH}/current/images/netboot/ubuntu-installer/${ARCH}/linux -O linux #wget http://fr.archive.ubuntu.com/ubuntu/dists/${DISTRO}/main/installer-${ARCH}/current/images/netboot/ubuntu-installer/${ARCH}/linux -O linux
wget http://fr.archive.ubuntu.com/ubuntu/dists/${DISTRO}/main/installer-${ARCH}/current/images/netboot/ubuntu-installer/${ARCH}/initrd.gz -O initrd.gz #wget http://fr.archive.ubuntu.com/ubuntu/dists/${DISTRO}/main/installer-${ARCH}/current/images/netboot/ubuntu-installer/${ARCH}/initrd.gz -O initrd.gz
popd wget --quiet http://fr.archive.ubuntu.com/ubuntu/dists/${DISTRO}/main/installer-${ARCH}/current/images/netboot/ubuntu-installer/${ARCH}/linux -O linux
wget --quiet http://fr.archive.ubuntu.com/ubuntu/dists/${DISTRO}/main/installer-${ARCH}/current/images/netboot/ubuntu-installer/${ARCH}/initrd.gz -O initrd.gz
popd > /dev/null
done done
done done

View File

@ -17,47 +17,53 @@ fi
for DISTRO in stretch buster jessie wheezy sid; do # For ALL Debian's version for DISTRO in stretch buster jessie wheezy sid; do # For ALL Debian's version
TEMP_DIR=$(mktemp -d) TEMP_DIR=$(mktemp -d)
pushd "${TEMP_DIR}" pushd "${TEMP_DIR}" > /dev/null
# Download and uncompress original initrd # Download and uncompress original initrd
wget http://ftp.fr.debian.org/debian/dists/${DISTRO}/main/installer-amd64/current/images/netboot/debian-installer/amd64/initrd.gz #wget http://ftp.fr.debian.org/debian/dists/${DISTRO}/main/installer-amd64/current/images/netboot/debian-installer/amd64/initrd.gz
wget --quiet http://ftp.fr.debian.org/debian/dists/${DISTRO}/main/installer-amd64/current/images/netboot/debian-installer/amd64/initrd.gz
mkdir "${TEMP_DIR}"/mkinitrd mkdir "${TEMP_DIR}"/mkinitrd
pushd "${TEMP_DIR}"/mkinitrd/ pushd "${TEMP_DIR}"/mkinitrd/ > /dev/null
zcat ../initrd.gz | cpio -iv zcat ../initrd.gz | cpio -iv
popd popd > /dev/null
# Download bnx2's firmware and uncompress it # Download bnx2's firmware and uncompress it
wget http://ftp.fr.debian.org/debian/pool/non-free/f/firmware-nonfree/firmware-bnx2_0.43_all.deb #wget http://ftp.fr.debian.org/debian/pool/non-free/f/firmware-nonfree/firmware-bnx2_0.43_all.deb
wget --quiet http://ftp.fr.debian.org/debian/pool/non-free/f/firmware-nonfree/firmware-bnx2_0.43_all.deb
dpkg-deb -x firmware-bnx2_0.43_all.deb "${TEMP_DIR}"/mkinitrd dpkg-deb -x firmware-bnx2_0.43_all.deb "${TEMP_DIR}"/mkinitrd
# Download tigon(all non-free)'s firmware and uncompress it # Download tigon(all non-free)'s firmware and uncompress it
wget http://ftp.fr.debian.org/debian/pool/non-free/f/firmware-nonfree/firmware-linux-nonfree_0.43_all.deb #wget http://ftp.fr.debian.org/debian/pool/non-free/f/firmware-nonfree/firmware-linux-nonfree_0.43_all.deb
wget --quiet http://ftp.fr.debian.org/debian/pool/non-free/f/firmware-nonfree/firmware-linux-nonfree_0.43_all.deb
dpkg-deb -x firmware-linux-nonfree_0.43_all.deb "${TEMP_DIR}"/mkinitrd dpkg-deb -x firmware-linux-nonfree_0.43_all.deb "${TEMP_DIR}"/mkinitrd
# Download myricom for IBM # Download myricom for IBM
wget http://ftp.fr.debian.org/debian/pool/non-free/f/firmware-nonfree/firmware-myricom_0.43_all.deb #wget http://ftp.fr.debian.org/debian/pool/non-free/f/firmware-nonfree/firmware-myricom_0.43_all.deb
wget --quiet http://ftp.fr.debian.org/debian/pool/non-free/f/firmware-nonfree/firmware-myricom_0.43_all.deb
dpkg-deb -x firmware-myricom_0.43_all.deb "${TEMP_DIR}"/mkinitrd dpkg-deb -x firmware-myricom_0.43_all.deb "${TEMP_DIR}"/mkinitrd
# Download qlogic # Download qlogic
wget http://ftp.fr.debian.org/debian/pool/non-free/f/firmware-nonfree/firmware-qlogic_0.43_all.deb #wget http://ftp.fr.debian.org/debian/pool/non-free/f/firmware-nonfree/firmware-qlogic_0.43_all.deb
wget --quiet http://ftp.fr.debian.org/debian/pool/non-free/f/firmware-nonfree/firmware-qlogic_0.43_all.deb
dpkg-deb -x firmware-qlogic_0.43_all.deb "${TEMP_DIR}"/mkinitrd dpkg-deb -x firmware-qlogic_0.43_all.deb "${TEMP_DIR}"/mkinitrd
# Download iwlwifi # Download iwlwifi
wget http://ftp.fr.debian.org/debian/pool/non-free/f/firmware-nonfree/firmware-iwlwifi_20170823-1_all.deb -O firmware-iwlwifi_all.deb #wget http://ftp.fr.debian.org/debian/pool/non-free/f/firmware-nonfree/firmware-iwlwifi_20170823-1_all.deb -O firmware-iwlwifi_all.deb
wget --quiet http://ftp.fr.debian.org/debian/pool/non-free/f/firmware-nonfree/firmware-iwlwifi_20170823-1_all.deb -O firmware-iwlwifi_all.deb
dpkg-deb -x firmware-iwlwifi_all.deb "${TEMP_DIR}"/mkinitrd dpkg-deb -x firmware-iwlwifi_all.deb "${TEMP_DIR}"/mkinitrd
# Make a new initrd # Make a new initrd
mv initrd.gz initrd_orig.gz mv initrd.gz initrd_orig.gz
pushd "${TEMP_DIR}"/mkinitrd/ pushd "${TEMP_DIR}"/mkinitrd/ > /dev/null
find . -print0 | cpio -0 -H newc -ov | gzip -c > ../initrd.gz find . -print0 | cpio -0 -H newc -ov | gzip -c > ../initrd.gz
popd popd > /dev/null
# Move it to PXE Debian installer # Move it to PXE Debian installer
mkdir -p ${TFTP_DIRECTORY}/installer/debian/${DISTRO}/amd64/ mkdir -p ${TFTP_DIRECTORY}/installer/debian/${DISTRO}/amd64/
mv initrd.gz ${TFTP_DIRECTORY}/installer/debian/${DISTRO}/amd64/initrd_firm.gz mv initrd.gz ${TFTP_DIRECTORY}/installer/debian/${DISTRO}/amd64/initrd_firm.gz
popd popd > /dev/null
# Clean temp file # Clean temp file
rm -rf "${TEMP_DIR}" rm -rf "${TEMP_DIR}"