Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-commits
Navigation:
Lists: gentoo-commits: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-commits@g.o
From: "Ian Stakenvicius (axs)" <axs@g.o>
Subject: gentoo-x86 commit in eclass: ChangeLog user.eclass
Date: Fri, 22 Jun 2012 18:57:34 +0000 (UTC)
axs         12/06/22 18:57:34

  Modified:             ChangeLog user.eclass
  Log:
  esethome: eerror and not die when home dir cannot be updated, due to for instance user being in use

Revision  Changes    Path
1.326                eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.326&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.326&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.325&r2=1.326

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.325
retrieving revision 1.326
diff -u -r1.325 -r1.326
--- ChangeLog	22 Jun 2012 15:14:10 -0000	1.325
+++ ChangeLog	22 Jun 2012 18:57:33 -0000	1.326
@@ -1,6 +1,10 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.325 2012/06/22 15:14:10 axs Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.326 2012/06/22 18:57:33 axs Exp $
+
+  22 Jun 2012; Ian Stakenvicius <axs@g.o> user.eclass:
+  esethome: eerror and not die when home dir cannot be updated, due to for
+  instance user being in use
 
   22 Jun 2012; Ian Stakenvicius <axs@g.o> user.eclass:
   fixed esethome, directory must exist befure user record can be updated



1.21                 eclass/user.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/user.eclass?rev=1.21&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/user.eclass?rev=1.21&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/user.eclass?r1=1.20&r2=1.21

Index: user.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/user.eclass,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- user.eclass	22 Jun 2012 15:14:10 -0000	1.20
+++ user.eclass	22 Jun 2012 18:57:33 -0000	1.21
@@ -1,6 +1,6 @@
 # Copyright 1999-2012 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/user.eclass,v 1.20 2012/06/22 15:14:10 axs Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/user.eclass,v 1.21 2012/06/22 18:57:33 axs Exp $
 
 # @ECLASS: user.eclass
 # @MAINTAINER:
@@ -439,14 +439,21 @@
 		;;
 
 	*-freebsd*|*-dragonfly*)
-		pw usermod "${euser}" -d "${ehome}" || die
+		pw usermod "${euser}" -d "${ehome}" && return 0
+		[[ $? == 8 ]] && eerror "${euser} is in use, cannot update home"
+		eerror "There was an error when attempting to update the home directory for ${euser}"
+		eerror "Please update it manually on your system:"
+		eerror "\t pw usermod \"${euser}\" -d \"${ehome}\""
 		;;
 
 	*)
-		usermod -d "${ehome}" "${euser}" || die
+		usermod -d "${ehome}" "${euser}" && return 0
+		[[ $? == 8 ]] && eerror "${euser} is in use, cannot update home"
+		eerror "There was an error when attempting to update the home directory for ${euser}"
+		eerror "Please update it manually on your system (as root):"
+		eerror "\t usermod -d \"${ehome}\" \"${euser}\""
 		;;
 	esac
-
 }
 
 fi





Navigation:
Lists: gentoo-commits: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
proj/emacs-tools:eselect-emacs-1.1 commit in: /
Next by thread:
gentoo-x86 commit in media-tv/mythtv: ChangeLog mythtv-0.25.1.ebuild
Previous by date:
proj/emacs-tools:eselect-emacs-1.1 commit in: /
Next by date:
gentoo-x86 commit in media-tv/mythtv: ChangeLog mythtv-0.25.1.ebuild


Updated Jun 26, 2012

Summary: Archive of the gentoo-commits mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.