Check-in [ac97a7c17b]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview

SHA1 Hash:ac97a7c17bd1a2cfe8c6d89370c03d6bfece9b93
Date: 2012-07-17 11:08:15
User: BarryK
Comment:/fsckme.flg deleted at normal shutdown, now retain if maximal mount count reached, so will do f.s. check at next bootup

Tags And Properties
Changes

Changes to woof-code/rootfs-skeleton/etc/rc.d/rc.shutdown

@@ -98,11 +98,21 @@
 #echo "`eval_gettext \"\\\${DISTRO_NAME} is now shutting down...\"`" > /dev/console
 #echo "${DISTRO_NAME} is now shutting down..." > /dev/console
 echo "${DISTRO_NAME} $(gettext 'is now shutting down...')" > /dev/console #120130
 
 #100315 improper shutdown check. see /etc/rc.d/rc.sysinit, /init in initramfs, and /sbin/init...
-[ -f /fsckme.flg ] && rm -f /fsckme.flg
+if [ -f /fsckme.flg ];then
+ if [ -f /tmp/dmesg_e2fsck_warnings1 ];then #120717 rc.sysinit creates this file for full installation.
+  if [ "`grep -G "(${PDEV1})" /tmp/dmesg_e2fsck_warnings1`" = "" ];then
+   rm -f /fsckme.flg
+  else
+   echo -n 'MAXIMAL' >> /fsckme.flg #read by /sbin/initNEW
+  fi
+ else
+  rm -f /fsckme.flg
+ fi
+fi
 [ -f /initrd${PUP_HOME}/fsckme.flg ] && rm -f /initrd${PUP_HOME}/fsckme.flg
 
 ORIGPUPMODE=$PUPMODE #v2.22
 
 #echo $(gettext "Executing /etc/rc.d/rc.shutdown...")

Changes to woof-code/rootfs-skeleton/etc/rc.d/rc.sysinit

@@ -77,10 +77,11 @@
 #120505 remove network reconnect flag if it exists.
 #120704 introduce /etc/rc.d/BOOTCONSTRAINED. written by 3builddistro.
 #120706 removed some sync's, think they are bad idea in this script.
 #120709 BOOT_UDEVDCHILDREN from /etc/rc.d/BOOTCONSTRAINED
 #120716 log size of ram, read by /sbin/initNEW for f.s. check.
+#120717 log ext2,3,4 f.s. that have reached maximal mount count.
 
 #unset TZ #100319 busybox hwclock gives priority to this (rather than /etc/localtime) and 'init' has set it wrong.
 #...comment-out for now. note, TZ now set in rc.country.
 ORIGLANG="`grep '^LANG=' /etc/profile | cut -f 2 -d '=' | cut -f 1 -d ' '`" #120217
 ORIGLANG1="${ORIGLANG%_*}" #ex: en
@@ -197,12 +198,22 @@
 FREERAM=`free | grep -o 'Mem: .*' | tr -s ' ' | cut -f 4 -d ' '` #w481 110405
 QTRFREERAM=`expr $FREERAM \/ 4`
 mkdir -p /dev/shm #120503 if kernel mounts a f.s. on /dev, removes my skeleton /dev
 mount -t tmpfs -o size=${QTRFREERAM}k shmfs /dev/shm ;STATUS=$((STATUS+$?))
 
-#120716 /sbin/init needs to know ramdisk size, before /sys mounted...
-[ ! -f /var/local/ram_size_bytes ] && [ -e /sys/block/ram0/size ] && cat /sys/block/ram0/size > /var/local/ram_size_bytes
+if [ ! -d /initrd ];then
+ #120717 this is not so good on raspi with only 256MB RAM, but saves flash writes and faster...
+ #mount -t tmpfs -o size=${QTRFREERAM}k tmpfs /tmp ;STATUS=$((STATUS+$?))
+ #120716 /sbin/init needs to know ramdisk size, before /sys mounted...
+ [ ! -f /var/local/ram_size_bytes ] && [ -e /sys/block/ram0/size ] && cat /sys/block/ram0/size > /var/local/ram_size_bytes
+ #120717 log maximal mount counts, potentially rc.shutdown can then not delete /fsckme.flg...
+ #dmesg | grep -o 'EXT[2,3,4]-fs.*running e2fsck is recommended' > /tmp/dmesg_e2fsck_warnings1
+ dmesg | grep -o 'EXT[2,3,4]-fs.*maximal mount count reached' > /tmp/dmesg_e2fsck_warnings1
+ #example lines:
+ #EXT3-fs (sda9): warning: mounting fs with errors, running e2fsck is recommended
+ #EXT3-fs (sda10): warning: maximal mount count reached, running e2fsck is recommended
+fi
 
 #w478 moved this code above call to rc.update...
 KERNVER="`uname -r`"
 #KERNMAJ=`echo -n "$KERNVER" | cut -f 3 -d '.' | cut -f 1 -d '-' | cut -f 1 -d '_'` #v431 100831. 120124 remove.
 #w469 may need to run 'depmod'...

Changes to woof-code/rootfs-skeleton/sbin/initNEW

@@ -11,10 +11,11 @@
 #120408 support minit
 #120516 gentoo: libgcc_s.so.1 in wrong place.
 #120627 check ramdisk big enough.
 #120716 revert 120627, /sys not yet loaded. do it a different way. fix for weird 'tr' missing.
 #120716 raspi: no battery-backed hardware clock, so date is wrong, workaround. fixes for rc.sysinit in ramdisk.
+#120717 f.s. maximal mount count reached, perform f.s. check.
 
 INITEXE='/bin/busybox init'
 [ -f /sbin/minit ] && INITEXE='/sbin/minit'
 
 [ -d /initrd ] && exec ${INITEXE} #not a full hd install.
@@ -39,14 +40,19 @@
 export LANG=C
 
 #only come here if full hd install, and previous improper shutdown.
 PDEV1="`cat /fsckme.flg | cut -f 1 -d ','`" #file format: sda1,ext3,
 DEV1FS="`cat /fsckme.flg | cut -f 2 -d ','`"
+CHECK="`cat /fsckme.flg | cut -f 3 -d ','`" #120717 see rc.shutdown.
 case $DEV1FS in
  ext2|ext3|ext4)
   echo -e "\\033[1;31m"  >/dev/console #34=blue, 33=yellow, 32=green, 31=red, 35=purple, 36=aquablue, 38=black.
-  echo "Performing filesystem check of '${PDEV1}' after improper shutdown" > /dev/console
+  if [ "$CHECK" = "MAXIMAL" ];then #120717
+   echo "Performing filesystem check of '${PDEV1}', maximal mount count" > /dev/console
+  else
+   echo "Performing filesystem check of '${PDEV1}' after improper shutdown" > /dev/console
+  fi
   echo -n "NOTE: no progress indication, may take awhile, please wait patiently..."
   echo -e "\\033[0;39m" >/dev/console
   echo  >/dev/console
   busybox mount -t proc none /proc
   busybox mount -o remount,rw /

Changes to woof-distro/arm/Packages-puppy-armv6-official

@@ -226,12 +226,12 @@
 viewnior_DOC-1.1-armv6|viewnior_DOC|1.1-armv6||Graphic|24K||viewnior_DOC-1.1-armv6.pet||simple image viewer||||
 viewnior_NLS-1.1-armv6|viewnior_NLS|1.1-armv6||Graphic|448K||viewnior_NLS-1.1-armv6.pet|+viewnior|simple image viewer||||
 vobcopy-1.2.0-armv6|vobcopy|1.2.0-armv6||BuildingBlock|80K||vobcopy-1.2.0-armv6.pet|+libdvdread|used for dvd ripping|puppy|||
 vobcopy_DOC-1.2.0-armv6|vobcopy_DOC|1.2.0-armv6||BuildingBlock|200K||vobcopy_DOC-1.2.0-armv6.pet||used for dvd ripping||||
 wvdial-1.41-patched2-armv6|wvdial|1.41-patched2-armv6||BuildingBlock|224K||wvdial-1.41-patched2-armv6.pet||cli modem dialer, used by PupDial for Internet access|gentoo|gap6||
-wvdial-1.61-sap6|wvdial|1.61-sap6||BuildingBlock|260K||wvdial-1.61-sap6.pet|+wvstreams|modem dialup utilties|debian|squeeze||
-wvdial_DOC-1.61-sap6|wvdial_DOC|1.61-sap6||BuildingBlock|44K||wvdial_DOC-1.61-sap6.pet||modem dialup utilities||||
+wvdial-1.61-1-sap6|wvdial|1.61-1-sap6||BuildingBlock|260K||wvdial-1.61-1-sap6.pet|+wvstreams|modem dialup utilties|debian|squeeze||
+wvdial_DOC-1.61-1-sap6|wvdial_DOC|1.61-1-sap6||BuildingBlock|44K||wvdial_DOC-1.61-1-sap6.pet||modem dialup utilities||||
 wvstreams-4.6.1-patched_t2-sap6|wvstreams|4.6.1-patched_t2-sap6||BuildingBlock|2236K||wvstreams-4.6.1-patched_t2-sap6.pet||needed by wvdial|debian|squeeze||
 wvstreams_DEV-4.6.1-patched_t2-sap6|wvstreams_DEV|4.6.1-patched_t2-sap6||BuildingBlock|6424K||wvstreams_DEV-4.6.1-patched_t2-sap6.pet|+wvstreams|needed by wvdial|debian|squeeze||
 wvstreams_DOC-4.6.1-patched_t2-sap6|wvstreams_DOC|4.6.1-patched_t2-sap6||BuildingBlock|28K||wvstreams_DOC-4.6.1-patched_t2-sap6.pet||needed by wvdial||||
 x264-20120610-2245-armv6|x264|20120610-2245-armv6||BuildingBlock|988K||x264-20120610-2245-armv6.pet||video codec library|puppy|||
 x264_DEV-20120610-2245-armv6|x264_DEV|20120610-2245-armv6||BuildingBlock|72K||x264_DEV-20120610-2245-armv6.pet|+x264|video codec library|puppy|||