diff options
Diffstat (limited to 'util')
-rwxr-xr-x | util/mkrootfs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/util/mkrootfs b/util/mkrootfs index 91eff68..ae1f489 100755 --- a/util/mkrootfs +++ b/util/mkrootfs @@ -1,6 +1,7 @@ #!/bin/sh OLDPWD="$PWD" cd "$(dirname "$0")" +BUSYBOX_SRC="$(realpath ../busybox)" BUSYBOX_FS="$(realpath ../busybox/rootfs)" OVERLAY_FS="$(realpath ../rootfs)" cd "$OLDPWD" @@ -9,7 +10,13 @@ cd "$OLDPWD" cd "$1" # scaffold folders -for dir in bin dev etc home lib mnt opt proc root run sbin srv sys tmp usr var ; do +for dir in \ + bin dev etc home lib proc root sbin srv sys tmp usr var \ + var/log var/run \ + etc/network/if-down.d etc/network/if-post-down.d \ + etc/network/if-pre-up.d etc/network/if-up.d \ + usr/share/udhcpc +do mkdir -p "$dir" done @@ -28,10 +35,5 @@ cp $CPFLAGS "$OVERLAY_FS/." . # setuid busybox chmod a=xrs,u+w bin/busybox -# create a root user -! [ -e etc/passwd ] && echo "root:x:0:0::/root:/bin/sh" > etc/passwd -! [ -e etc/shadow ] && echo "root:!:0:0:99999:0:::" > etc/shadow -! [ -e etc/group ] && echo "root:x:0:root" > etc/shadow - # exit safely (continue makefile) exit 0 |