Skip to content

Commit 2581b6e

Browse files
committed
feat: add user script
1 parent d48de17 commit 2581b6e

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

scripts/add-user.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/system/bin/sh
2+
# generate user files in the bootstrap
3+
4+
mkdir -p bootstrap/home/$1
5+
echo "$1:x:$USER_ID:$USER_ID:guest:/home/$1:/bin/sh" >> bootstrap/etc/passwd

scripts/generate-bootstraps.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ build_bootstrap () {
5252
curl -o rootfs.tar.xz -L "https://us.images.linuxcontainers.org/images/alpine/3.13/$1/default/20210330_13:00/rootfs.tar.xz"
5353
cp ../../run-bootstrap.sh .
5454
cp ../../install-bootstrap.sh .
55-
zip -r bootstrap-$PROOT_ARCH.zip root root-pre5 rootfs.tar.xz run-bootstrap.sh install-bootstrap.sh
55+
zip -r bootstrap-$PROOT_ARCH.zip root root-pre5 rootfs.tar.xz run-bootstrap.sh install-bootstrap.sh add-user.sh
5656
mv bootstrap-$PROOT_ARCH.zip ../
5757
echo "Packed bootstrap $1"
5858
cd ..
@@ -61,4 +61,4 @@ build_bootstrap () {
6161
build_bootstrap arm64
6262
build_bootstrap armhf
6363
build_bootstrap amd64
64-
build_bootstrap i386
64+
build_bootstrap i386

0 commit comments

Comments
 (0)