summaryrefslogtreecommitdiff
path: root/package/base-files
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2010-12-16 20:00:57 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2010-12-16 20:00:57 +0100
commit7de31639b85a7b4ee855bb0bfaa124ab9ee37de4 (patch)
tree0d01a9aa08281ef563809a6e7878b285ff2324cf /package/base-files
parentdf3ea528e4d90a3b767b03a942011ba6ce0c81cf (diff)
interfaces contains wpa keys, make it non-readable for the user, optimize init and shutdown
Diffstat (limited to 'package/base-files')
-rw-r--r--package/base-files/Makefile3
-rwxr-xr-xpackage/base-files/src/etc/init.d/rcK2
-rw-r--r--package/base-files/src/etc/rc.shutdown1
-rwxr-xr-xpackage/base-files/src/init3
4 files changed, 5 insertions, 4 deletions
diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index 2cd221fb1..cb6fea5f4 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:= 39
+PKG_RELEASE:= 40
PKG_SECTION:= base
PKG_DESCR:= basic files and scripts
@@ -50,6 +50,7 @@ endif
mkdir -p $(IDIR_BASE_FILES)/usr/{lib,bin}
chmod 755 $(IDIR_BASE_FILES)/lib/mdev/init
chmod 600 $(IDIR_BASE_FILES)/etc/shadow
+ chmod 600 $(IDIR_BASE_FILES)/etc/network/interfaces
ln -sf ../proc/mounts $(IDIR_BASE_FILES)/etc/mtab
rm -rf $(IDIR_BASE_FILES)/var
ln -sf tmp $(IDIR_BASE_FILES)/var
diff --git a/package/base-files/src/etc/init.d/rcK b/package/base-files/src/etc/init.d/rcK
index 20c47f5db..9d0e06440 100755
--- a/package/base-files/src/etc/init.d/rcK
+++ b/package/base-files/src/etc/init.d/rcK
@@ -1,7 +1,6 @@
#!/bin/sh
export PATH=/bin:/sbin:/usr/bin:/usr/sbin
{
- test -e /etc/rc.shutdown && (/bin/sh /etc/rc.shutdown) 2>&1
grep '^#INIT ' /etc/init.d/* | \
sort -rnk2 | \
while read line; do
@@ -15,4 +14,5 @@ export PATH=/bin:/sbin:/usr/bin:/usr/sbin
esac
${shebang:-/bin/sh} ${line%%:*} autostop 2>&1
done
+ test -e /etc/rc.shutdown && (/bin/sh /etc/rc.shutdown) 2>&1
} | logger -s -p 6 -t ''
diff --git a/package/base-files/src/etc/rc.shutdown b/package/base-files/src/etc/rc.shutdown
index a5b930ad9..85d9e0058 100644
--- a/package/base-files/src/etc/rc.shutdown
+++ b/package/base-files/src/etc/rc.shutdown
@@ -1,4 +1,5 @@
#!/bin/sh
for i in $(grep -v ^# /etc/fstab |awk '{ print $2 }');do
+ printf Unmounting $i
umount $i
done
diff --git a/package/base-files/src/init b/package/base-files/src/init
index af780c324..fc4ec8cb9 100755
--- a/package/base-files/src/init
+++ b/package/base-files/src/init
@@ -16,8 +16,7 @@ exec 0<>/dev/console >&0 2>&0
echo >/dev/mdev.seq
echo "/sbin/mdev" >/proc/sys/kernel/hotplug
mdev -s
-mount -o remount,rw /
cat /etc/.rnd >/dev/urandom 2>&1
-[ -x /sbin/cfgfs ] && { cfgfs setup; mount -o remount,ro /;}
+[ -x /sbin/cfgfs ] && { cfgfs setup; mount -o remount,ro /;} || mount -o remount,rw /
[ -f /etc/fstab ] && fsck -p >/dev/null ; mount -a
exec /sbin/init