File tree Expand file tree Collapse file tree 4 files changed +9
-8
lines changed Expand file tree Collapse file tree 4 files changed +9
-8
lines changed Original file line number Diff line number Diff line change 44
55[ -f " $ROOTFS_LOCK " ] || mount_rootfs_all
66
7- do_chroot su
7+ do_chroot /bin/sh -c su
88
99quit
Original file line number Diff line number Diff line change 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
99quit
Original file line number Diff line number Diff line change 55[ -f " $ROOTFS_LOCK " ] || mount_rootfs_all
66
77if [ -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."
910elif [ -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."
1214else
1315 fail " Unsupport system."
1416fi
1517
16- do_chroot adduser -D kindle || fail " cannot add user."
1718echo " kindle ALL=(ALL) ALL" > " $ROOTFS_DIR /etc/sudoers.d/kindle" || fail
1819chmod 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
2122quit
Original file line number Diff line number Diff line change 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
99quit
You can’t perform that action at this time.
0 commit comments