Skip to content

Commit

Permalink
don't fail on missing /etc/passwd (fix issue with previous commit) #55
Browse files Browse the repository at this point in the history
  • Loading branch information
mviereck committed Jul 7, 2018
1 parent 4c97f58 commit 88debc2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions x11docker
Original file line number Diff line number Diff line change
Expand Up @@ -1684,7 +1684,7 @@ $Customenvironment" ; shift ;; # set custom environm
# getent passwd $Hostuser >/dev/null 2>&1 || error "Could not find user '$Hostuser' in /etc/passwd."
getent passwd $Hostuser >/dev/null 2>&1 || {
[ -e /etc/passwd ] || warning "Your system misses /etc/passwd"
error "Could not find user '$Hostuser' in /etc/passwd."
warning "Could not find user '$Hostuser' in /etc/passwd."
}
Hostuser=$(id -un $Hostuser)
Hostuseruid=$(id -u $Hostuser)
Expand Down Expand Up @@ -1744,7 +1744,7 @@ $Customenvironment" ; shift ;; # set custom environm

verbose "x11docker version $Version
docker version: $(docker --version)
Host system: $(source /etc/os-release ; echo "$PRETTY_NAME")
Host system: $(source /etc/os-release 2>/dev/null; echo "$PRETTY_NAME")
Command: $0 $X11dockerargs
Parsed options: $Parsedoptions"
Wisdom="$(fortune -s 2>/dev/null || echo "Install fortunes to find wisdom.")"
Expand Down Expand Up @@ -2745,7 +2745,7 @@ After finish: $Logbackup"
[ "$Xaxis" -gt "$Maxxaxis" ] && Maxxaxis=$Xaxis
[ "$Yaxis" -gt "$Maxyaxis" ] && Maxyaxis=$Yaxis

Modeline="$(cvt $Xaxis $Yaxis | tail -n1 | cut -d' ' -f2-)"
command -v cvt >/dev/null && Modeline="$(cvt $Xaxis $Yaxis | tail -n1 | cut -d' ' -f2-)"

# kill dummy Xwayland process
checkpid $Xwaylandpid && {
Expand Down Expand Up @@ -3858,7 +3858,7 @@ done
[ -e "$Tinibinary" ] || Tinibinary="/snap/docker/current/usr/bin/docker-init"
[ -e "/usr/local/share/x11docker/tini-static" ] && Tinibinary="/usr/local/share/x11docker/tini-static"
[ -e "$Hostuserhome/.local/share/x11docker/tini-static" ] && Tinibinary="$Hostuserhome/.local/share/x11docker/tini-static"
Tinibinary="$(realpath "$Tinibinary")"
Tinibinary="$(realpath "$Tinibinary" 2>/dev/null)"
[ -e "$Tinibinary" ] || Tinibinary=""
[ "$Tinibinary" ] && {
[ -x "$Tinibinary" ] || {
Expand Down

0 comments on commit 88debc2

Please sign in to comment.