Преглед изворни кода

interfaces contains wpa keys, make it non-readable for the user, optimize init and shutdown

Waldemar Brodkorb пре 13 година
родитељ
комит
7de31639b8

+ 2 - 1
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

+ 1 - 1
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 ''

+ 1 - 0
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

+ 1 - 2
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