-Ajout du bootscript cleanfs.
-Ajout du script tarbz2.
--- /dev/null
+#!/bin/sh
+
+# cleanfs
+# Clean file system
+
+# Source functions library
+source /etc/rc.d/init.d/functions
+
+log_script_name "$0 $*"
+
+clean_files()
+{
+ failed=0
+
+ cd /tmp &&
+ find . -xdev -mindepth 1 ! -name lost+found ! -name trash ! -name log-init ! -name init.log -delete || failed=1
+
+ cd /var/lock &&
+ find . -type f ! -newer /proc -exec rm -f {} \; || failed=1
+
+ cd /var/run &&
+ find . ! -type d ! -name utmp ! -newer /proc -exec rm -f {} \; || failed=1
+ > /var/run/utmp
+ if grep -q '^utmp:' /etc/group ; then
+ chmod 664 /var/run/utmp
+ chgrp utmp /var/run/utmp
+ fi
+
+ return ${failed}
+}
+
+
+case "${1}" in
+ start)
+ cmd_run_log_box "Cleaning file systems" clean_files
+ ;;
+ *)
+ echo "Usage: $0 {start}"
+ exit ${EXIT_CODE_FAILURE}
+ ;;
+esac
+
+exit $?
fi
# Copying boot scripts
-STAGE2_BOOTSCRIPTS="functions rc checkfs dhcp halt ifdown ifup initlog keyboard modules mountfs \
+STAGE2_BOOTSCRIPTS="functions rc checkfs cleanfs dhcp halt ifdown ifup initlog keyboard modules mountfs \
mountkernfs mountnetfs network nfs portmap reboot sendsignals setclock sshd swap sysklogd udev udev_retry"
mkdir -p /etc/rc.d/init.d &&
for bootscript in ${STAGE2_BOOTSCRIPTS}; do
bootscript_add_rcS swap 25 94 &&
bootscript_add_rcS checkfs 30 00 &&
bootscript_add_rcS mountfs 35 95 &&
-bootscript_add_rcS udev_retry 40 00 &&
-bootscript_add_rcS sysklogd 45 93 &&
-bootscript_add_rcS keyboard 50 00 &&
-bootscript_add_rcS setclock 55 92 &&
+bootscript_add_rcS cleanfs 40 00 &&
+bootscript_add_rcS udev_retry 45 00 &&
+bootscript_add_rcS sysklogd 50 93 &&
+bootscript_add_rcS keyboard 55 00 &&
+bootscript_add_rcS setclock 60 92 &&
# rc0.d
bootscript_add_manual 0 sendsignals 95 00 &&
source ../functions
source ../packages-list
-# Saves CFLAGS and CXXFLAGS, and clears them.
-save_flags_no_optimizations
-
# Applying a sed substitution that will suppress the installation of
# libiberty.a. We want to use the Binutils version of libiberty.a
cd ${LFS_TMP}/${1} &&
echo 'main(){}' > dummy.c &&
cc dummy.c &&
readelf -l a.out | grep ': /lib' 1> /dev/null 2>&1 &&
-rm dummy.c a.out &&
-
-# Restore original CFLAGS and CXXFLAGS values.
-restore_flags
+rm dummy.c a.out
# Return last error
exit $?
BIN_UTILITIES="camera-download cd-erase cd-copy pstopdf distro-backup dos2unix \
dvd-ram-format fix-avi gztobz2 hv-backup hv-video-dvd mail-files \
mail-if-fail mail-statistics media-write pstopdf replace.pl \
- rotatelogs setdate strip-debug-symbols tildes-clean"
+ rotatelogs setdate strip-debug-symbols tarbz2 tildes-clean"
for program in ${BIN_UTILITIES}; do
install -v ${SRCDIR}/${program} ${BINDIR} || exit 1
--- /dev/null
+#!/bin/sh
+
+print_usage()
+{
+ echo "$(basename $0) -- Create bzip2 compressed TAR archive."
+ echo "Usage: $(basename $0) DIR"
+}
+
+if [ $# -ne 1 ]; then
+ print_usage
+ exit 1
+fi
+
+DIR=${1}
+
+# Checking if directory exists.
+if [ ! -d ${DIR} ]; then
+ echo "$0: Directory ${DIR} not found."
+ exit 1
+fi
+
+# Decompressing file to standard output and piping result to bzip2
+tar cvf - ${DIR} | bzip2 -9 > ${DIR}.tar.bz2
+
+exit $?
fpkg_sf ${FLEX}
fpkg_gnu ${INETUTILS}
fpkg_hv ${IPROUTE2}
-fpkg_lfs ${FILE_PKG} "file"
+fpkg ${FILE_PKG} "ftp://ftp.gw.com/mirrors/unix/file/"
fpkg ${KBD} http://www.kernel.org/pub/linux/utils/kbd
fpkg ${GRUB} ftp://alpha.gnu.org/gnu/grub
fpkg ${MAN} http://primates.ximian.com/~flucifredi/man