Skip to content

Commit 5b8e2d1

Browse files
committed
fix for KT3
1 parent 1f5cb85 commit 5b8e2d1

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

chroot.shell.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44

55
[ -f "$ROOTFS_LOCK" ] || mount_rootfs_all
66

7-
do_chroot su
7+
do_chroot /bin/sh -c su
88

99
quit

chroot.shell.user.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44

55
[ -f "$ROOTFS_LOCK" ] || mount_rootfs_all
66

7-
do_chroot su -l kindle
7+
do_chroot /bin/sh -c 'su -l kindle'
88

99
quit

install.sudo.user.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,18 @@
55
[ -f "$ROOTFS_LOCK" ] || mount_rootfs_all
66

77
if [ -f "$ROOTFS_DIR/etc/apk/repositories" ]; then
8-
do_chroot apk add sudo || fail "cannot install sudo."
8+
do_chroot /bin/sh -c 'apk add sudo' || fail "cannot install sudo."
9+
do_chroot /bin/busybox adduser -D kindle || fail "cannot add user."
910
elif [ -f "$ROOTFS_DIR/etc/apt/sources.list" ]; then
10-
do_chroot apt update || fail "cannot install sudo."
11-
do_chroot apt install -y sudo || fail "cannot install sudo."
11+
do_chroot /bin/sh -c 'apt update' || fail "cannot install sudo."
12+
do_chroot /bin/sh -c 'apt install -y sudo' || fail "cannot install sudo."
13+
do_chroot /bin/sh -c 'useradd -m kindle' || fail "cannot add user."
1214
else
1315
fail "Unsupport system."
1416
fi
1517

16-
do_chroot adduser -D kindle || fail "cannot add user."
1718
echo "kindle ALL=(ALL) ALL" > "$ROOTFS_DIR/etc/sudoers.d/kindle" || fail
1819
chmod 440 "$ROOTFS_DIR/etc/sudoers.d/kindle" || fail
19-
do_chroot passwd kindle || fail "cannot change password.(You can safely change password later.)"
20+
do_chroot /bin/sh -c 'passwd kindle' || fail "cannot change password.(You can safely change password later.)"
2021

2122
quit

set.user.password.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44

55
[ -f "$ROOTFS_LOCK" ] || mount_rootfs_all
66

7-
do_chroot passwd kindle || fail "cannot change password."
7+
do_chroot /bin/sh -c 'passwd kindle' || fail "cannot change password."
88

99
quit

0 commit comments

Comments
 (0)