Skip to main content
34 events
when toggle format what by license comment
Jul 5, 2023 at 13:05 history bumped CommunityBot This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Feb 18, 2023 at 2:00 history bumped CommunityBot This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Oct 15, 2022 at 12:07 history bumped CommunityBot This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Jun 17, 2022 at 8:04 history bumped CommunityBot This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Feb 17, 2022 at 6:05 history bumped CommunityBot This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Oct 17, 2021 at 4:10 history bumped CommunityBot This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Sep 15, 2021 at 11:17 answer added Morsmalleo timeline score: 0
Jun 5, 2021 at 20:04 history bumped CommunityBot This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Feb 1, 2021 at 13:08 history bumped CommunityBot This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Oct 2, 2020 at 1:01 history bumped CommunityBot This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
May 22, 2020 at 18:08 history bumped CommunityBot This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Jan 20, 2020 at 9:00 history bumped CommunityBot This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Sep 12, 2019 at 15:00 history tweeted twitter.com/StackUnix/status/1172163058514481152
Sep 12, 2019 at 3:03 history bumped CommunityBot This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Sep 25, 2015 at 8:44 answer added Dom timeline score: 1
Sep 20, 2015 at 10:34 comment added nkms Comment space is low for a detail analysis but you probably need to brake the script in little chunks doing different things, see how & why they work and then bring them together in a bigger script. On exporting variables I assumed that pacaur needs $PKGDEST to work, correct? If so, all you need is 'export PKGDEST=/tmp/test/AUR/' without the 'su -c - "$USER"' before it because the variable $PKGDEST is lost after 'su' command and won't be available on the rest of the script. 'sudo bash' let's the user run any command as root, 'sudo script.sh' might be just ok under very strict circumstances.
Sep 20, 2015 at 10:18 comment added Dom I thought an explanation of why I'm starting the script as root may be relevant. Quote from the archiso wiki: " Note: You must be root to do this, [add files, etc] do not change the ownership of any of the files you copy over, everything within the airootfs directory must be root owned. Proper ownerships will be sorted out shortly. " Source: wiki.archlinux.org/index.php/Archiso#Adding_files_to_image
Sep 20, 2015 at 9:59 comment added Dom Hello nkms, Thanks for commenting and please bare with me. This is my first bash script more than a few lines long. Expecting things are going to be "very wrong" while learning. The script won't run, thats why I'm here seeking help, asking the best way to do it. Would you have any advise, sources of info, etc? Confused by the variables bit, "just use export VAR", which and how? Using $USER as set by system, not setting it in script. Advise on a replacement allowing sharing script with others? File checks for files I create and append? Again, please elaborate and thanks in advance.
Sep 20, 2015 at 7:53 comment added nkms You expect to pass a variable to a sequential shell (su -c - "$USER" "export VAR" && su -c - "$USER" "echo $VAR"). That will not work, variables are exported only on child shells, just use "export VAR" it will be passed along with su (plus $USER is an environment variable, there might be a conflict, so use another). Also, if are going through all this in order to bypass checks of makepkg (not familiar) than ok(?!), but if care about security then you say "starts 3rd script as root with: sudo /bin/bash". That is very wrong plus you make no checks at all to files you append/overwrite.
Sep 20, 2015 at 6:23 history edited Dom CC BY-SA 3.0
added 59 characters in body
Sep 20, 2015 at 6:13 comment added Dom I edited the op to add part of the script along with set -x output. The script is basically working on top of an existing application called archiso. My goal is to build a script to automate a lot of manual work I already do. Archiso is used to create a live .iso image. After I get this working, I will work on an install script that will run in archiso and uses the work done by this script.
Sep 20, 2015 at 6:06 history edited Dom CC BY-SA 3.0
added 6023 characters in body
Sep 20, 2015 at 6:00 history edited Dom CC BY-SA 3.0
added 6023 characters in body
Sep 18, 2015 at 11:53 comment added terdon It's very hard to understand what you're doing since you don't show your scripts. Could you simplify this to an example script that reproduces the problem? If you need to run a single command as non-root, just use sudo -u user command or su -c command user.
Sep 18, 2015 at 11:50 history rollback terdon
Rollback to Revision 3
Sep 18, 2015 at 8:46 comment added Dom This is an Arch Linux relate standard, to not build packages as root. In fact makepkg will not run as root. Arch has the AUR, Arch user repository. This repo contains build scripts rather than binary pre built packages. Anyone can contribute, mostly unchecked, so the potential is there for things to go wrong, either in error or malicious. More info: allanmcrae.com/2015/01/replacing-makepkg-asroot
Sep 18, 2015 at 6:00 comment added Bichoy Why does building a list of packages requires to be user not root? Are you on NFS?
Sep 18, 2015 at 4:09 history edited eyoung100 CC BY-SA 3.0
Added Arch Tag
Sep 18, 2015 at 2:30 comment added Dom I'm running this on Arch Linux and sudo is set up. I'd like to possibly share this script down the road, so I'd like to keep as generic as possible. I edited the op to reflect this.
Sep 18, 2015 at 2:25 history edited Dom CC BY-SA 3.0
condensed, clarifiy
Sep 17, 2015 at 23:00 history edited Anthon CC BY-SA 3.0
deleted 34 characters in body
Sep 17, 2015 at 22:32 comment added terdon What OS are you using? Do you have sudo set up?
Sep 17, 2015 at 21:45 review First posts
Sep 17, 2015 at 23:00
Sep 17, 2015 at 21:44 history asked Dom CC BY-SA 3.0