Skip to content

Commit 43a9380

Browse files
committed
Improve setup-user.sh and packers.sh
1 parent 52b2ccc commit 43a9380

File tree

5 files changed

+15
-10
lines changed

5 files changed

+15
-10
lines changed

Diff for: plugins/envsetup

+4-3
Original file line numberDiff line numberDiff line change
@@ -411,9 +411,10 @@ setup_user() {
411411
cp plugins/setup-user.sh $chroot_dir
412412
sed -i "s/FS_USER/$FS_USER/g" $chroot_dir/setup-user.sh
413413
sed -i "s/FS_PASS/$FS_PASS/g" $chroot_dir/setup-user.sh
414-
run_cmd chmod +x /setup-user.sh
415-
run_cmd /bin/bash /setup-user.sh
416-
run_cmd rm -rf /setup-user.sh
414+
install_pkg "openssl"
415+
run_cmd "chmod +x /setup-user.sh"
416+
run_cmd "/bin/bash /setup-user.sh"
417+
run_cmd "rm -rf /setup-user.sh"
417418
}
418419

419420
do_chroot_proot_ae() {

Diff for: plugins/gz-packer.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
target=$1
44

55
tar \
6-
--exclude={/data,/dev,/apex,/vendor,/system,/sdcard} \
7-
--exclude={/proc/*,/sys/*,/tmp/*,/mnt/*,/media/*,/lost+found/*} \
6+
--exclude={/data,/apex,/vendor,/system,/sdcard} \
7+
--exclude={/dev/*,/proc/*,/sys/*,/tmp/*,/mnt/*,/media/*,/lost+found/*} \
88
--exclude="*.l2s.*" \
99
--exclude=/${0} \
1010
--exclude="/${target}.tar.gz" \

Diff for: plugins/j-packer.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
target=$1
44

55
tar \
6-
--exclude={/data,/dev,/apex,/vendor,/system,/sdcard} \
7-
--exclude={/proc/*,/sys/*,/tmp/*,/mnt/*,/media/*,/lost+found/*} \
6+
--exclude={/data,/apex,/vendor,/system,/sdcard} \
7+
--exclude={/dev/*,/proc/*,/sys/*,/tmp/*,/mnt/*,/media/*,/lost+found/*} \
88
--exclude="*.l2s.*" \
99
--exclude=/${0} \
1010
--exclude="/${target}.tar.gz" \

Diff for: plugins/lz-packer.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
target=$1
44

55
tar \
6-
--exclude={/data,/dev,/apex,/vendor,/system,/sdcard} \
7-
--exclude={/proc/*,/sys/*,/tmp/*,/mnt/*,/media/*,/lost+found/*} \
6+
--exclude={/data,/apex,/vendor,/system,/sdcard} \
7+
--exclude={/dev/*,/proc/*,/sys/*,/tmp/*,/mnt/*,/media/*,/lost+found/*} \
88
--exclude="*.l2s.*" \
99
--exclude=/${0} \
1010
--exclude="/${target}.tar.gz" \

Diff for: plugins/setup-user.sh

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
#!/usr/bin/env bash
2+
3+
# username = FS_USER
4+
# password = FS_PASS
5+
26
useradd -m \
7+
-p "$(openssl passwd -1 FS_PASS)" \
38
-G sudo \
49
-d /home/FS_USER \
510
-k /etc/skel \
611
-s /bin/bash \
712
FS_USER
8-
echo "FS_USER:FS_PASS" | chpasswd
913
echo FS_USER ALL=\(root\) ALL > /etc/sudoers.d/FS_USER
1014
chmod 0440 /etc/sudoers.d/FS_USER

0 commit comments

Comments
 (0)