diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2014-03-14 15:36:25 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2014-03-14 15:36:25 +0100 |
commit | e8c23f19ce40c7c374d1f1c12da9da58e09ed587 (patch) | |
tree | 5f0452433cbee6edfb26774161c77ec647acca42 | |
parent | 608f969e4d96cb1b2a361c2a3b6a32233a644e3b (diff) | |
parent | e70d661a971e05735e21968dd7b0d6bc10d6c6dd (diff) |
Merge branch 'master' of git+ssh://openadk.org/git/openadk
-rw-r--r-- | package/base-files/Makefile | 2 | ||||
-rw-r--r-- | package/base-files/src/etc/init.d/fs | 49 | ||||
-rw-r--r-- | package/base-files/src/etc/init.d/fsnet | 49 |
3 files changed, 50 insertions, 50 deletions
diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 81fb1f6df..89b9414d9 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/mk/rootfs.mk PKG_NAME:= base-files PKG_VERSION:= 1.0 -PKG_RELEASE:= 70 +PKG_RELEASE:= 71 PKG_SECTION:= base PKG_DESCR:= basic files and scripts PKG_BUILDDEP:= pkgconf-host file-host diff --git a/package/base-files/src/etc/init.d/fs b/package/base-files/src/etc/init.d/fs index 75ae760e0..8f4397897 100644 --- a/package/base-files/src/etc/init.d/fs +++ b/package/base-files/src/etc/init.d/fs @@ -1,20 +1,53 @@ #!/bin/sh -#INIT 60 +#INIT 20 [[ $1 = autostart ]] || exit 0 -# mount net filesystems (nfs/cifs) -grep nfs /proc/filesystems >/dev/null 2>&1 +# activate swap +[ -x /sbin/swapon ] && { swapon -a; } + +# activate any logical volumes +[ -x /usr/sbin/lvm ] && { lvm vgscan; lvm vgchange -ay; } + +# filesystem checks +[ -x /sbin/fsck.ext2 ] && { + for i in $(grep -v "^#" /etc/fstab|grep ext2|awk '{ print $1}');do fsck.ext2 $i;done; +} +[ -x /sbin/fsck.ext3 ] && { + for i in $(grep -v "^#" /etc/fstab|grep ext3|awk '{ print $1}');do fsck.ext3 $i;done; +} +[ -x /sbin/fsck.ext4 ] && { + for i in $(grep -v "^#" /etc/fstab|grep ext4|awk '{ print $1}');do fsck.ext4 $i;done; +} +[ -x /sbin/fsck.xfs ] && { + for i in $(grep -v "^#" /etc/fstab|grep xfs|awk '{ print $1}');do xfs_repair $i;done; +} +# local filesystems +grep ext2 /proc/filesystems >/dev/null 2>&1 +if [ $? -eq 0 ];then + grep -v "^#" /etc/fstab |grep ext2 >/dev/null 2>&1 + if [ $? -eq 0 ];then + mount -a -t ext2 + fi +fi +grep ext3 /proc/filesystems >/dev/null 2>&1 +if [ $? -eq 0 ];then + grep -v "^#" /etc/fstab |grep ext3 >/dev/null 2>&1 + if [ $? -eq 0 ];then + mount -a -t ext3 + fi +fi +grep ext4 /proc/filesystems >/dev/null 2>&1 if [ $? -eq 0 ];then - grep -v "^#" /etc/fstab| grep nfs >/dev/null 2>&1 + grep -v "^#" /etc/fstab |grep ext4 >/dev/null 2>&1 if [ $? -eq 0 ];then - mount -a -t nfs + mount -a -t ext4 fi fi -grep cifs /proc/filesystems >/dev/null 2>&1 +grep xfs /proc/filesystems >/dev/null 2>&1 if [ $? -eq 0 ];then - grep -v "^#" /etc/fstab| grep cifs >/dev/null 2>&1 + grep -v "^#" /etc/fstab |grep xfs >/dev/null 2>&1 if [ $? -eq 0 ];then - mount -a -t cifs + mount -a -t xfs fi fi exit 0 diff --git a/package/base-files/src/etc/init.d/fsnet b/package/base-files/src/etc/init.d/fsnet index 8f4397897..75ae760e0 100644 --- a/package/base-files/src/etc/init.d/fsnet +++ b/package/base-files/src/etc/init.d/fsnet @@ -1,53 +1,20 @@ #!/bin/sh -#INIT 20 +#INIT 60 [[ $1 = autostart ]] || exit 0 -# activate swap -[ -x /sbin/swapon ] && { swapon -a; } - -# activate any logical volumes -[ -x /usr/sbin/lvm ] && { lvm vgscan; lvm vgchange -ay; } - -# filesystem checks -[ -x /sbin/fsck.ext2 ] && { - for i in $(grep -v "^#" /etc/fstab|grep ext2|awk '{ print $1}');do fsck.ext2 $i;done; -} -[ -x /sbin/fsck.ext3 ] && { - for i in $(grep -v "^#" /etc/fstab|grep ext3|awk '{ print $1}');do fsck.ext3 $i;done; -} -[ -x /sbin/fsck.ext4 ] && { - for i in $(grep -v "^#" /etc/fstab|grep ext4|awk '{ print $1}');do fsck.ext4 $i;done; -} -[ -x /sbin/fsck.xfs ] && { - for i in $(grep -v "^#" /etc/fstab|grep xfs|awk '{ print $1}');do xfs_repair $i;done; -} -# local filesystems -grep ext2 /proc/filesystems >/dev/null 2>&1 -if [ $? -eq 0 ];then - grep -v "^#" /etc/fstab |grep ext2 >/dev/null 2>&1 - if [ $? -eq 0 ];then - mount -a -t ext2 - fi -fi -grep ext3 /proc/filesystems >/dev/null 2>&1 -if [ $? -eq 0 ];then - grep -v "^#" /etc/fstab |grep ext3 >/dev/null 2>&1 - if [ $? -eq 0 ];then - mount -a -t ext3 - fi -fi -grep ext4 /proc/filesystems >/dev/null 2>&1 +# mount net filesystems (nfs/cifs) +grep nfs /proc/filesystems >/dev/null 2>&1 if [ $? -eq 0 ];then - grep -v "^#" /etc/fstab |grep ext4 >/dev/null 2>&1 + grep -v "^#" /etc/fstab| grep nfs >/dev/null 2>&1 if [ $? -eq 0 ];then - mount -a -t ext4 + mount -a -t nfs fi fi -grep xfs /proc/filesystems >/dev/null 2>&1 +grep cifs /proc/filesystems >/dev/null 2>&1 if [ $? -eq 0 ];then - grep -v "^#" /etc/fstab |grep xfs >/dev/null 2>&1 + grep -v "^#" /etc/fstab| grep cifs >/dev/null 2>&1 if [ $? -eq 0 ];then - mount -a -t xfs + mount -a -t cifs fi fi exit 0 |