diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2010-07-05 15:34:35 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2010-07-05 15:34:35 +0200 |
commit | 3b76e79f14e279a6526809e630e45e4f760d77de (patch) | |
tree | bb479b57c7ad1362f05a0532a7133c0c5232dfeb /package/base-files | |
parent | 9bfe4f2061f377306619fa479bc0e7adafb22125 (diff) | |
parent | 1879491b2b6e799b20ac06d1b510726eb200944f (diff) |
Merge branch 'master' of git+ssh://openadk.org/git/openadk
Diffstat (limited to 'package/base-files')
-rw-r--r-- | package/base-files/Makefile | 18 | ||||
-rw-r--r-- | package/base-files/src/etc/ipkg.conf | 2 | ||||
-rwxr-xr-x | package/base-files/src/etc/network/if-pre-up.d/04-wireless | 24 | ||||
-rw-r--r-- | package/base-files/src/etc/profile | 1 | ||||
-rw-r--r-- | package/base-files/src/etc/shadow | 3 | ||||
-rwxr-xr-x | package/base-files/src/init | 3 | ||||
-rwxr-xr-x | package/base-files/src/sbin/adkupdate | 3 |
7 files changed, 34 insertions, 20 deletions
diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 3f63df3e6..560158226 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -6,9 +6,9 @@ include $(TOPDIR)/mk/rootfs.mk PKG_NAME:= base-files PKG_VERSION:= 1.0 -PKG_RELEASE:= 10 -PKG_DESCR:= basic filesystem structure and scripts +PKG_RELEASE:= 17 PKG_SECTION:= base +PKG_DESCR:= basic filesystem structure and scripts WRKDIST= ${WRKDIR}/base-files NO_DISTFILES:= 1 @@ -31,12 +31,10 @@ do-install: ifeq (${ADK_TARGET_ROOTFS_NFSROOT},y) @-rm $(IDIR_BASE_FILES)/etc/network/interfaces endif -ifeq (${ADK_TARGET_PACKAGE_IPKG},y) $(SED) 's,@TARGET@,$(ADK_TARGET),g' $(IDIR_BASE_FILES)/etc/ipkg.conf - $(SED) 's,@VERSION@,$(ADK_VERSION),g' $(IDIR_BASE_FILES)/etc/ipkg.conf -else - @-rm $(IDIR_BASE_FILES)/etc/ipkg.conf -endif + $(SED) 's,@HOST@,$(ADK_HOST),g' $(IDIR_BASE_FILES)/etc/ipkg.conf + $(SED) 's,@LIBC@,$(ADK_LIBC),g' $(IDIR_BASE_FILES)/etc/ipkg.conf + $(SED) 's,@VENDOR@,$(ADK_VENDOR),g' $(IDIR_BASE_FILES)/etc/ipkg.conf echo /bin/sh >${IDIR_BASE_FILES}/etc/shells echo /bin/ash >>${IDIR_BASE_FILES}/etc/shells ifneq (${ADK_PACKAGE_BASH},) @@ -64,10 +62,14 @@ endif mkdir -p $(IDIR_BASE_FILES)/usr/bin chmod 755 $(IDIR_BASE_FILES)/lib/mdev/init chmod 600 $(IDIR_BASE_FILES)/etc/shadow - ln -sf ../tmp/resolv.conf $(IDIR_BASE_FILES)/etc/resolv.conf ln -sf ../proc/mounts $(IDIR_BASE_FILES)/etc/mtab rm -rf $(IDIR_BASE_FILES)/var ln -sf tmp $(IDIR_BASE_FILES)/var + test -z $(ADK_PASSWORD) || \ + $(SED) 's,\*NP\*,'"$$(${STAGING_TOOLS}/bin/mkcrypt \ + ${ADK_PASSWORD}),g" $(IDIR_BASE_FILES)/etc/shadow + git log -1|head -1|sed -e 's#commit ##' \ + > $(IDIR_BASE_FILES)/etc/adkversion ifneq (${ADK_PACKAGE_CONFIG_IN_ETC},) gzip -9c ${TOPDIR}/.config >$(IDIR_BASE_FILES)/etc/adkconfig.gz endif diff --git a/package/base-files/src/etc/ipkg.conf b/package/base-files/src/etc/ipkg.conf index 6c9242620..edb050116 100644 --- a/package/base-files/src/etc/ipkg.conf +++ b/package/base-files/src/etc/ipkg.conf @@ -1,3 +1,3 @@ -src openadk http://www.openadk.org/packages/@TARGET@ +src @VENDOR@ http://@HOST@/@TARGET@_@LIBC@/packages dest root / dest ram /tmp diff --git a/package/base-files/src/etc/network/if-pre-up.d/04-wireless b/package/base-files/src/etc/network/if-pre-up.d/04-wireless index 1898de4d4..1ccc4d823 100755 --- a/package/base-files/src/etc/network/if-pre-up.d/04-wireless +++ b/package/base-files/src/etc/network/if-pre-up.d/04-wireless @@ -74,13 +74,23 @@ case "$IF_WIRELESS_MODE" in } ;; sta) - [ -x /usr/sbin/iw ] || { - logger -t wireless "No iw utility found" - exit 1 - } ip link set up dev ${IFACE} - iw dev ${IFACE} set channel $IF_WIRELESS_CHANNEL - iw dev ${IFACE} connect $IF_WIRELESS_SSID + [ $IF_WIRELESS_EXTENSION -eq 1 ] && { + [ -x /usr/sbin/iwconfig ] || { + logger -t wireless "No wireless-tools found" + exit 1 + } + driver=wext + iwconfig ${IFACE} essid $IF_WIRELESS_SSID + } || { + [ -x /usr/sbin/iw ] || { + logger -t wireless "No iw utility found" + exit 1 + } + driver=nl80211 + iw dev ${IFACE} set channel $IF_WIRELESS_CHANNEL + iw dev ${IFACE} connect $IF_WIRELESS_SSID + } [ $wpa2 -eq 1 ] && { [ -x /usr/sbin/wpa_supplicant ] || { logger -t wireless "No wpa_supplicant found" @@ -93,7 +103,7 @@ case "$IF_WIRELESS_MODE" in echo " psk=\"$IF_WIRELESS_PASSPHRASE\"" >> /tmp/wpa_supplicant.conf echo " priority=5" >> /tmp/wpa_supplicant.conf echo "}" >> /tmp/wpa_supplicant.conf - wpa_supplicant -B -Dnl80211 -i${IFACE} -c/tmp/wpa_supplicant.conf + wpa_supplicant -B -D${driver} -i${IFACE} -c/tmp/wpa_supplicant.conf } ;; *) diff --git a/package/base-files/src/etc/profile b/package/base-files/src/etc/profile index 1b8f4a6a6..b849feb49 100644 --- a/package/base-files/src/etc/profile +++ b/package/base-files/src/etc/profile @@ -4,7 +4,6 @@ if [[ $(id -u) = 0 ]]; then export PS1='# ' else export PS1='$ ' - export HOME=/tmp fi cat /etc/banner 2>&- [ -x /usr/bin/vim ] && alias vi=vim || alias vim=vi diff --git a/package/base-files/src/etc/shadow b/package/base-files/src/etc/shadow index 3683d71ea..374e358bb 100644 --- a/package/base-files/src/etc/shadow +++ b/package/base-files/src/etc/shadow @@ -1,3 +1,2 @@ -root:$1$8sJkb6fV$46vEIu5ntmbUuljmr55zY/:14191:0::::: -admin:$1$8sJkb6fV$46vEIu5ntmbUuljmr55zY/:14191:0::::: +root:*NP*:14191:0::::: nobody:*:9797:0::::: diff --git a/package/base-files/src/init b/package/base-files/src/init index 618547693..173e91b0b 100755 --- a/package/base-files/src/init +++ b/package/base-files/src/init @@ -4,7 +4,8 @@ export PATH=/bin:/sbin:/usr/bin:/usr/sbin mount -nt proc proc /proc mount -o nosuid,nodev,noexec -t sysfs sysfs /sys [ ! -f /etc/notmpfs ] && { - size=$(awk '/MemTotal:/ { if ($2 > 16000) { print 4096 } else { print 2048 }}' /proc/meminfo) + size=2048 + size=$(cat /etc/tmpfs 2>/dev/null) mount none /tmp -t tmpfs -o size=${size}k mount none /tmp -t tmpfs -o remount,nosuid,nodev,mode=1777 } diff --git a/package/base-files/src/sbin/adkupdate b/package/base-files/src/sbin/adkupdate index dd8d3ecec..3de759c74 100755 --- a/package/base-files/src/sbin/adkupdate +++ b/package/base-files/src/sbin/adkupdate @@ -29,9 +29,12 @@ check_exit() { prepare() { cd / if [ -x /sbin/cfgfs ];then + pkill crond umount -f /etc + check_exit fi mount -o remount,rw / + check_exit if [ "$system" == "RB532" ];then mount -t yaffs2 /dev/mtdblock0 /boot elif [ "$system" == "AR7130" ];then |