Skip to content

Commit

Permalink
commit 20220502.e46e6eca
Browse files Browse the repository at this point in the history
  • Loading branch information
SDRausty committed May 2, 2022
1 parent 24e1040 commit 292a696
Show file tree
Hide file tree
Showing 10 changed files with 262 additions and 269 deletions.
2 changes: 1 addition & 1 deletion .conf/VERSIONID
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.545
2.0.546
371 changes: 182 additions & 189 deletions archlinuxconfig.bash

Large diffs are not rendered by default.

28 changes: 14 additions & 14 deletions initkeyfunctions.bash
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ _ADDyt_
_ADDzshrc_
}
_ADDauser_() {
_CFLHDR_ $TMXRCHBNDS/addauser "# add Arch Linux in Termux PRoot user"
_CFLHDR_ $TMXRCHBNDS/addauser "# add Arch Linux in Termux PRoot QEMU user"
cat >> $TMXRCHBNDS/addauser <<- EOM
_HUSDIRC_() {
if [ "\$UID" != 0 ]
Expand All @@ -151,7 +151,7 @@ fi
}
_FUNADDU_() {
command -v sudo 1>/dev/null || { "$TMXRCHBNDR"/pc sudo || "$TMXRCHBNDR"/pc sudo ; }
printf "\\\\e[0;32m%s\\\\n\\\\e[1;32m" "Adding Arch Linux in Termux PRoot user '\$1' and creating Arch Linux in Termux PRoot user \$1's home directory in /home/\$1..."
printf "\\\\e[0;32m%s\\\\n\\\\e[1;32m" "Adding Arch Linux in Termux PRoot QEMU user '\$1' and creating Arch Linux in Termux PRoot QEMU user \$1's home directory in /home/\$1..."
[ -f /etc/sudoers ] || :>/etc/sudoers
sed -i "/# %wheel ALL=(ALL) NOPASSWD: ALL/ s/^# *//" /etc/sudoers
sed -i "/# ALL ALL=(ALL) ALL/ s/^# *//" /etc/sudoers
Expand All @@ -166,7 +166,7 @@ chage -I -1 -m 0 -M -1 -E -1 "\$1"
passwd -d "\$1"
chmod 775 "/home/\$1"
sed -i "s/\$1:x/\$1:/g" /etc/passwd
printf "\\\\e[0;32m%s\\\\e[1;32m%s\\\\e[0;32m%s\\\\e[1;32m%s\\\\e[0;32m%s\\\\e[1;32m%s\\\\e[0;32m%s\\\\e[1;32m%s\\\\e[0;32m%s\\\\e[0m\\\\n" "Added Arch Linux in Termux PRoot user " "'\$1'" " and configured user '\$1' for use with the Arch Linux command 'sudo'. Created Arch Linux user \$1's home directory in /home/\$1. To use this account run " "'$STARTBIN login \$1'" " from the shell in Termux. To add user accounts you can use " "'addauser \$1'" " in Arch Linux and " "'$STARTBIN c[ommand] addauser \$1'" " in the default Termux shell. Please do not nest proot in proot by using '$STARTBIN' in '$STARTBIN' as this is known to cause issues for users of PRoot."
printf "\\\\e[0;32m%s\\\\e[1;32m%s\\\\e[0;32m%s\\\\e[1;32m%s\\\\e[0;32m%s\\\\e[1;32m%s\\\\e[0;32m%s\\\\e[1;32m%s\\\\e[0;32m%s\\\\e[0m\\\\n" "Added Arch Linux in Termux PRoot QEMU user " "'\$1'" " and configured user '\$1' for use with the Arch Linux command 'sudo'. Created Arch Linux user \$1's home directory in /home/\$1. To use this account run " "'$STARTBIN login \$1'" " from the shell in Termux. To add user accounts you can use " "'addauser \$1'" " in Arch Linux and " "'$STARTBIN c[ommand] addauser \$1'" " in the default Termux shell. Please do not nest proot in proot by using '$STARTBIN' in '$STARTBIN' as this is known to cause issues for users of PRoot."
}
_PMFSESTRING_() {
printf "\\\\e[1;31m%s\\\\e[0;31m%s\\\\e[0;36m%s\\\\n\\\\n" "Signal generated in '\$1'; " "Cannot complete task; " "Continuing..."
Expand Down Expand Up @@ -467,17 +467,17 @@ _CFLHDR_ "$STARTBIN"
printf "%s\\n" "${FLHDRP[@]}" >> "$STARTBIN"
cat >> "$STARTBIN" <<- EOM
_CHCKUSER_() { [ -d "$INSTALLDIR/home/\$2" ] || _PRNTUSGE_ "\$@" ; }
_COMMANDGNE_() { printf "\\n\\e[1;48;5;138mTermuxArch script %s\\e[0m\\n\\n" "\${0##*/} NOTICE: Please run '\${0##*/}' and 'bash \${0##*/}' from the BASH shell in native Termux: EXITING..." && exit 202 ; }
_COMMANDGNE_() { printf "\\e[1;48;5;138mTermuxArch %s\\e[0m " "\${SRPTNM^^} NOTICE: Please run '\${0##*/}' and 'bash \${0##*/}' from the BASH shell in native Termux: EXITING..." && exit 202 ; }
if [ -w /root ]
then
_COMMANDGNE_
fi
_PRINTUSAGE_() {
printf "\\n\\e[1;32m%s\\e[0;32m%s\\n\\n" "$STARTBIN" " starts Arch Linux in $TXPRQUON with PRoot root login. This account is reserved for system administration. Please use any system administrator account with care."
printf "\\e[1;32m%s\\e[0;32m%s\\e[1;32m%s\\e[0;32m%s\\n\\n" "$STARTBIN c[ommand] command" " runs Arch Linux commands from Termux as PRoot root login. Quoting multiple commands can assit when passing multiple arguments; i.e. " "$STARTBIN c 'whoami ; cat -n /etc/pacman.d/mirrorlist'" ". Please pass commands through the system administrator account with caution."
printf "\\n\\e[1;32m%s\\e[0;32m%s\\n\\n" "$STARTBIN" " starts Arch Linux in $TXPRQUON with PRoot QEMU root login. This account is reserved for system administration. Please use any system administrator account with care."
printf "\\e[1;32m%s\\e[0;32m%s\\e[1;32m%s\\e[0;32m%s\\n\\n" "$STARTBIN c[ommand] command" " runs Arch Linux commands from Termux as PRoot QEMU root login. Quoting multiple commands can assit when passing multiple arguments; i.e. " "$STARTBIN c 'whoami ; cat -n /etc/pacman.d/mirrorlist'" ". Please pass commands through the system administrator account with caution."
printf "\\e[1;32m%s\\e[0;32m%s\\e[1;32m%s\\e[0;32m%s\\e[1;32m%s\\e[0;32m%s\\n\\n" "$STARTBIN e[login|user] user" " login as user. Uses alternate elogin and euser option to login as user. This option is preferred for working with programs that have already been installed, and for working with the 'cp' and 'git' commands. Please use " "$STARTBIN c 'addauser user'" " first to create this user and the user's home directory."
printf "\\e[1;32m%s\\e[0;32m%s\\e[1;32m%s\\e[0;32m%s\\n\\n" "$STARTBIN l[ogin]|u[ser] user" " login as user. This option is preferred when installing software from a user account with the 'sudo' command, and when using the 'makeaur*' commands. Please use 'addauser user' first to create this user and the user's home directory."
printf "\\e[1;32m%s\\e[0;32m%s\\e[1;32m%s\\e[0;32m%s\\e[1;32m%s\\e[0;32m%s\\n\\n" "$STARTBIN r[aw]" " construct the " "$STARTBIN " "proot statement from exec.../bin/. For example " "$STARTBIN r su " "will exec 'su' in Arch Linux. After installing the appropriate packages in Arch Linux, easy PRoot root shell access is possible with option raw:
printf "\\e[1;32m%s\\e[0;32m%s\\e[1;32m%s\\e[0;32m%s\\e[1;32m%s\\e[0;32m%s\\n\\n" "$STARTBIN r[aw]" " construct the " "$STARTBIN " "proot statement from exec.../bin/. For example " "$STARTBIN r su " "will exec 'su' in Arch Linux. After installing the appropriate packages in Arch Linux, easy PRoot QEMU root shell access is possible with option raw:
~ $ startarch r bash
~ $ startarch r dash
Expand All @@ -486,12 +486,12 @@ printf "\\e[1;32m%s\\e[0;32m%s\\e[1;32m%s\\e[0;32m%s\\e[1;32m%s\\e[0;32m%s\\n\\n
~ $ startarch+x864 r sh
~ $ startarch+x864 r zsh
Command '${0##*/} qemu [options]' assists in installing alternate architectures. Variable PROOTSTMNT has more information about PRoot init statement options 'grep -h PROOTSTMNT ~/TermuxArchBloom/* | grep \=' if you wish to modify the PRoot init statement extensively. The PRoot init statement can also be modified on-the-fly simply by using the /var/binds/ directory once logged into the Arch Linux in Termux PRoot environment."
Command '${0##*/} qemu [options]' assists in installing alternate architectures. Variable PROOTSTMNT has more information about the PRoot QEMU init statement options 'grep -h PROOTSTMNT ~/TermuxArchBloom/* | grep \=' if you wish to modify the PRoot QEMU init statement extensively. The PRoot QEMU init statement can also be modified on-the-fly simply by using the /var/binds/ directory once logged into the Arch Linux in Termux PRoot QEMU environment."
printf "\\e[1;32m%s\\e[0;32m%s\\e[1;32m%s\\e[0;32m%s\\e[1;32m%s\\e[0;32m%s\\n\\n\\e[0m" "$STARTBIN s[u] user command" " executes commands as Arch Linux user from the Termux shell. This option is preferred when installing software from a user account with the 'sudo' command, and when using the 'makeaur*' commands. Quoting multiple commands can assit when passing multiple arguments: " "$STARTBIN s user 'whoami ; cat -n /etc/pacman.d/mirrorlist'" ". Please use " "$STARTBIN c 'addauser user'" " first to create a login and the login's home directory."
printf '\\033]2;%s\\007' "TermuxArch $STARTBIN $@ 📲; DONE 🏁"
}
_PRNTUSGE_() { _PRINTUSAGE_ && printf "\\e[0;33m%s\\e[1;30m%s\\e[1;32m%s\\e[1;30m%s\\e[1;31m%s\\e[1;30m%s\\e[0m" "It appears that user '\$2' does not exist in the Arch Linux in Termux PRoot system! " "You can create user '\$2' with the command " "\${0##*/} command 'addauser \$2'" " then rerun this comnand to login with user '\$2';" " Exiting" "... " ; exit 169 ; }
## [] Default Arch Linux in Termux PRoot root login.
_PRNTUSGE_() { _PRINTUSAGE_ && printf "\\e[0;33m%s\\e[1;30m%s\\e[1;32m%s\\e[1;30m%s\\e[1;31m%s\\e[1;30m%s\\e[0m" "It appears that user '\$2' does not exist in the Arch Linux in Termux PRoot QEMU system! " "You can create user '\$2' with the command " "\${0##*/} command 'addauser \$2'" " then rerun this comnand to login with user '\$2';" " Exiting" "... " ; exit 169 ; }
## [] Default Arch Linux in Termux PRoot QEMU root login.
if [[ -z "\${1:-}" ]]
then
printf '\\033]2;%s\\007' "TermuxArch $STARTBIN 📲"
Expand Down Expand Up @@ -532,11 +532,11 @@ if [ -f "$INSTALLDIR/var/lib/pacman/db.lck" ]
then
printf "%s" "File ~/${INSTALLDIR##*/}/var/lib/pacman/db.lck exists; You can use the TermuxArch 'pacmandblock' command to alter the lock state. Please use '$STARTBIN' and '$STARTBIN l[ogin] username' to install software in Arch Linux in Termux PRoot: "
else
printf "%s" "Creating file ~/${INSTALLDIR##*/}/var/lib/pacman/db.lck; You can use the TermuxArch 'pacmandblock' command to alter the lock state. Please use '$STARTBIN' and '$STARTBIN l[ogin] username' to install software in the Arch Linux in Termux PRoot environment: "
printf "%s" "Creating file ~/${INSTALLDIR##*/}/var/lib/pacman/db.lck; You can use the TermuxArch 'pacmandblock' command to alter the lock state. Please use '$STARTBIN' and '$STARTBIN l[ogin] username' to install software in the Arch Linux in Termux PRoot QEMU environment: "
:>"$INSTALLDIR/var/lib/pacman/db.lck"
printf "%s\\n" "Continuing..."
fi
printf "%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n" "if [ -f \"$INSTALLDIR/var/lock/${INSTALLDIR##*/}/\$\$elock\" ]" "then" "if [ -f \"$INSTALLDIR/var/lib/pacman/db.lck\" ]" "then" "printf \"%s\" \"Deleting file '~/${INSTALLDIR##*/}/var/lib/pacman/db.lck'; You can use the TermuxArch 'pacmandblock' command to alter this lock state. Please use 'startarch' and 'startarch l[ogin] username' to install software in the Arch Linux in Termux PRoot environment: \"" "rm -f \"$INSTALLDIR/var/lib/pacman/db.lck\"" "printf \"%s\\\\n\" \"DONE\"" "fi" "rm -f \"$INSTALLDIR/var/lock/${INSTALLDIR##*}\$\$elock\"" "fi" "[ ! -f "$INSTALLDIR/home/\$2/.hushlogout" ] && [ ! -f "$INSTALLDIR/home/\$2/.chushlogout" ] && . /etc/moto" "h # write session history to file HOME/.historyfile" "## .bash_logout FE" > "$INSTALLDIR/home/\$2/.bash_logout"
printf "%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n" "if [ -f \"$INSTALLDIR/var/lock/${INSTALLDIR##*/}/\$\$elock\" ]" "then" "if [ -f \"$INSTALLDIR/var/lib/pacman/db.lck\" ]" "then" "printf \"%s\" \"Deleting file '~/${INSTALLDIR##*/}/var/lib/pacman/db.lck'; You can use the TermuxArch 'pacmandblock' command to alter this lock state. Please use 'startarch' and 'startarch l[ogin] username' to install software in the Arch Linux in Termux PRoot QEMU environment: \"" "rm -f \"$INSTALLDIR/var/lib/pacman/db.lck\"" "printf \"%s\\\\n\" \"DONE\"" "fi" "rm -f \"$INSTALLDIR/var/lock/${INSTALLDIR##*}\$\$elock\"" "fi" "[ ! -f "$INSTALLDIR/home/\$2/.hushlogout" ] && [ ! -f "$INSTALLDIR/home/\$2/.chushlogout" ] && . /etc/moto" "h # write session history to file HOME/.historyfile" "## .bash_logout FE" > "$INSTALLDIR/home/\$2/.bash_logout"
## $INSTALLDIR$TMXRCHBNDR/keys FE
EOM
printf "%s\\n" "$PROOTSTMNTEU /bin/su - \"\$2\" ||:" >> "$STARTBIN"
Expand Down Expand Up @@ -572,7 +572,7 @@ _CHCKUSER_ "\$@"
printf '\\033]2;%s\\007' "TermuxArch $STARTBIN su \$2 \${@:3} 📲"
if [[ "\$2" = root ]]
then
printf "%s\\n" "Please use this command \"$STARTBIN c '\${@:3}'\" for the Arch Linux in Termux PRoot \$2 user account; Exiting..."
printf "%s\\n" "Please use this command \"$STARTBIN c '\${@:3}'\" for the Arch Linux in Termux PRoot QEMU \$2 user account; Exiting..."
exit
fi
:>"$INSTALLDIR/home/\$2/.chushlogin"
Expand Down Expand Up @@ -632,7 +632,7 @@ printf \"\\e[1;31m%s\\e[1;37m%s\\e[1;32m%s\\e[1;37m%s\\n\\n\" \"Signal generated
printf \"\\e[1;34m%s\\e[0;34m%s\\e[1;34m%s\\e[0;34m%s\\e[1;34m%s\\n\\n\" \" If you find better resolves for \" \"setupTermuxArch\" \" and \" \"\$0\" \", please open an issue and accompanying pull request.\"
}
_PMGPSSTRING_() {
printf \"\\n\\e[1;34m:: \\e[1;32m%s\\n\" \"Processing system for $NASVER $CPUABI, and removing redundant packages for Termux PRoot installation...\"
printf \"\\n\\e[1;34m:: \\e[1;32m%s\\n\" \"Processing system for $NASVER $CPUABI, and removing redundant packages for Termux PRoot QEMU installation...\"
}" >> root/bin/"$BINFNSTP"
_DOPROXY_
[ -d "$INSTALLDIR/run/lock/${INSTALLDIR##*/}" ] || mkdir -p "$INSTALLDIR/run/lock/${INSTALLDIR##*/}"
Expand Down
2 changes: 1 addition & 1 deletion printoutstatements.bash
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ FLHDR1[1]=""
FLHDR1[2]="set -Eeuo pipefail"
FLHDR1[3]="shopt -s extglob nullglob globstar"
FLHDR1[4]="unset LD_PRELOAD"
FLHDR1[5]="VERSIONID=2.0.544"
FLHDR1[5]="VERSIONID=2.0.545"
FLHDR1[6]="SRPTNM=\"\${0##*/}\""
FLHDRP[0]="## BEGIN #####################################################################"
FLHDRP[1]=""
Expand Down
Loading

1 comment on commit 292a696

@SDRausty
Copy link
Owner Author

@SDRausty SDRausty commented on 292a696 May 3, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.