Changeset 9cf508e in freewrt for package/base-files/Makefile


Ignore:
Timestamp:
Jul 21, 2006, 3:52:46 PM (19 years ago)
Author:
Markus Wigge <markus@…>
Branches:
freewrt_1_0, freewrt_2_0
Children:
0631111
Parents:
1d8c05f
Message:
  • added runtime config for password
  • added runtime config for ssh-key
  • added mkpasswd for crypt-md5 generation (needed for runtime password config)

git-svn-id: svn://www.freewrt.org/trunk/freewrt@325 afb5a338-a214-0410-bd46-81f09a774fd1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • package/base-files/Makefile

    r1d8c05f r9cf508e  
    3636PACKAGES_INSTALL:=$(IPKG_BASE) $(IPKG_UCLIBC)
    3737
     38MD5CRYPT := $(shell $(MKPASSWD) "$(BR2_RUNTIME_PASSWORD)")
     39
    3840ifeq ($(BR2_PACKAGE_LIBGCC),y)
    3941PACKAGES+=$(IPKG_LIBGCC)
     
    6264                    -e '/^src freewrt/s,"\(.*\)",\1,' $(IDIR_BASE)/etc/ipkg.conf
    6365        $(SED) 's,@TARGET@,$(BOARD)-$(KERNEL),g' $(IDIR_BASE)/etc/ipkg.conf
     66        test $(BR2_RUNTIME_PASSWORD) -eq "-KEY-" || (||
     67            test -n $(BR2_RUNTIME_PASSWORD) && \
     68                $(SED) 's,*NP*,$(MD5CRYPT),g' $(IDIR_BASE)/etc/passwd || \
     69                $(SED) 's,*NP*,,g' $(IDIR_BASE)/etc/passwd \
     70        )
     71        test -n $(BR2_RUNTIME_SSHKEY) && ( \
     72            mkdir -p $(IDIR_BASE)/etc/dropbear \
     73            echo $(BR2_RUNTIME_SSHKEY) > $(IDIR_BASE)/etc/dropbear/authorized_keys \
     74        )
    6475        mkdir -p $(IDIR_BASE)/dev
    6576        mkdir -p $(IDIR_BASE)/etc/crontabs
Note: See TracChangeset for help on using the changeset viewer.