Correct usermod for old user

This commit is contained in:
MatMoul 2018-07-22 18:39:19 +02:00
parent 3d0e1528c7
commit 280941dc00
2 changed files with 11 additions and 11 deletions

View file

@ -29,6 +29,12 @@ options+=("mkdir" "mkdir -pv" off)
if [ -f /usr/bin/trizen ]; then if [ -f /usr/bin/trizen ]; then
options+=("trizen" "sudo -u aurbuilder trizen" on) options+=("trizen" "sudo -u aurbuilder trizen" on)
fi fi
if [ -f /usr/bin/yay ]; then
options+=("yay" "sudo -u aurbuilder yay" on)
fi
if [ -f /usr/bin/aurman ]; then
options+=("aurman" "sudo -u aurbuilder aurman" on)
fi
if [ -f /usr/bin/yaourt ]; then if [ -f /usr/bin/yaourt ]; then
options+=("yaourt" "sudo -u aurbuilder yaourt --color" on) options+=("yaourt" "sudo -u aurbuilder yaourt --color" on)
options+=("yaourt(2)" "sudo -u aurbuilder yaourt" off) options+=("yaourt(2)" "sudo -u aurbuilder yaourt" off)
@ -84,6 +90,8 @@ for itm in $sel; do
;; ;;
'"mkdir"') echo "alias mkdir='mkdir -pv'" >> /etc/profile.d/alias.sh;; '"mkdir"') echo "alias mkdir='mkdir -pv'" >> /etc/profile.d/alias.sh;;
'"trizen"') echo "alias trizen='sudo -u aurbuilder trizen'" >> /etc/profile.d/alias.sh;; '"trizen"') echo "alias trizen='sudo -u aurbuilder trizen'" >> /etc/profile.d/alias.sh;;
'"yay"') echo "alias yay='sudo -u aurbuilder yay'" >> /etc/profile.d/alias.sh;;
'"aurman"') echo "alias aurman='sudo -u aurbuilder aurman'" >> /etc/profile.d/alias.sh;;
'"yaourt"') echo "alias yaourt='sudo -u aurbuilder yaourt --color'" >> /etc/profile.d/alias.sh;; '"yaourt"') echo "alias yaourt='sudo -u aurbuilder yaourt --color'" >> /etc/profile.d/alias.sh;;
'"yaourt(2)"') echo "alias yaourt='sudo -u aurbuilder yaourt'" >> /etc/profile.d/alias.sh;; '"yaourt(2)"') echo "alias yaourt='sudo -u aurbuilder yaourt'" >> /etc/profile.d/alias.sh;;
'"yaourt(3)"') echo "alias yaourt='yaourt --color'" >> /etc/profile.d/alias.sh;; '"yaourt(3)"') echo "alias yaourt='yaourt --color'" >> /etc/profile.d/alias.sh;;

View file

@ -83,7 +83,9 @@ checkaurdependencies(){
echo -e "$newpass\n$newpass\n"|passwd aurbuilder echo -e "$newpass\n$newpass\n"|passwd aurbuilder
newpass="" newpass=""
else else
usermod -m -d /tmp/aurbuilder aurbuilder 1&>/dev/null mkdir /tmp/aurbuilder 1&>/dev/null
chmod 777 /tmp/aurbuilder
usermod -d /tmp/aurbuilder aurbuilder 1&>/dev/null
fi fi
if [ ! -f /etc/sudoers.d/aurbuilder ]; then if [ ! -f /etc/sudoers.d/aurbuilder ]; then
echo "aurbuilder ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/aurbuilder echo "aurbuilder ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/aurbuilder
@ -92,8 +94,6 @@ checkaurdependencies(){
} }
checkpackagequerydependencies(){ checkpackagequerydependencies(){
if [ ! -f /usr/bin/package-query ]; then if [ ! -f /usr/bin/package-query ]; then
mkdir /tmp/aurbuilder 1&>/dev/null
chmod 777 /tmp/aurbuilder
cd /tmp/aurbuilder cd /tmp/aurbuilder
sudo -u aurbuilder git clone https://aur.archlinux.org/package-query.git sudo -u aurbuilder git clone https://aur.archlinux.org/package-query.git
cd package-query cd package-query
@ -142,8 +142,6 @@ case $sel in
if(confirm "Trizen allow you to access the AUR applications.\nBecause is not possible to compile applications as root,\nthis installer create an aurbuilder user.\n\nInstall trizen ?") then if(confirm "Trizen allow you to access the AUR applications.\nBecause is not possible to compile applications as root,\nthis installer create an aurbuilder user.\n\nInstall trizen ?") then
clear clear
checkaurdependencies checkaurdependencies
mkdir /tmp/aurbuilder 1&>/dev/null
chmod 777 /tmp/aurbuilder
cd /tmp/aurbuilder cd /tmp/aurbuilder
sudo -u aurbuilder git clone https://aur.archlinux.org/trizen.git sudo -u aurbuilder git clone https://aur.archlinux.org/trizen.git
cd trizen cd trizen
@ -154,8 +152,6 @@ case $sel in
if(confirm "Aurman allow you to access the AUR applications.\nBecause is not possible to compile applications as root,\nthis installer create an aurbuilder user.\n\nInstall aurman ?") then if(confirm "Aurman allow you to access the AUR applications.\nBecause is not possible to compile applications as root,\nthis installer create an aurbuilder user.\n\nInstall aurman ?") then
clear clear
checkaurdependencies checkaurdependencies
mkdir /tmp/aurbuilder 1&>/dev/null
chmod 777 /tmp/aurbuilder
cd /tmp/aurbuilder cd /tmp/aurbuilder
sudo -u aurbuilder git clone https://aur.archlinux.org/aurman.git sudo -u aurbuilder git clone https://aur.archlinux.org/aurman.git
cd aurman cd aurman
@ -168,8 +164,6 @@ case $sel in
if(confirm "Yay allow you to access the AUR applications.\nBecause is not possible to compile applications as root,\nthis installer create an aurbuilder user.\n\nInstall yay ?") then if(confirm "Yay allow you to access the AUR applications.\nBecause is not possible to compile applications as root,\nthis installer create an aurbuilder user.\n\nInstall yay ?") then
clear clear
checkaurdependencies checkaurdependencies
mkdir /tmp/aurbuilder 1&>/dev/null
chmod 777 /tmp/aurbuilder
cd /tmp/aurbuilder cd /tmp/aurbuilder
sudo -u aurbuilder git clone https://aur.archlinux.org/yay.git sudo -u aurbuilder git clone https://aur.archlinux.org/yay.git
cd yay cd yay
@ -181,8 +175,6 @@ case $sel in
clear clear
checkaurdependencies checkaurdependencies
checkpackagequerydependencies checkpackagequerydependencies
mkdir /tmp/aurbuilder 1&>/dev/null
chmod 777 /tmp/aurbuilder
cd /tmp/aurbuilder cd /tmp/aurbuilder
sudo -u aurbuilder git clone https://aur.archlinux.org/yaourt.git sudo -u aurbuilder git clone https://aur.archlinux.org/yaourt.git
cd yaourt cd yaourt