/[gentoo-x86]/eclass/user.eclass
Gentoo

Diff of /eclass/user.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.20 Revision 1.21
1# Copyright 1999-2012 Gentoo Foundation 1# Copyright 1999-2012 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/user.eclass,v 1.20 2012/06/22 15:14:10 axs Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/user.eclass,v 1.21 2012/06/22 18:57:33 axs Exp $
4 4
5# @ECLASS: user.eclass 5# @ECLASS: user.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# base-system@gentoo.org (Linux) 7# base-system@gentoo.org (Linux)
8# Joe Jezak <josejx@gmail.com> (OS X) 8# Joe Jezak <josejx@gmail.com> (OS X)
437 *-darwin*) 437 *-darwin*)
438 dscl . change "/users/${euser}" home "${ehome}" 438 dscl . change "/users/${euser}" home "${ehome}"
439 ;; 439 ;;
440 440
441 *-freebsd*|*-dragonfly*) 441 *-freebsd*|*-dragonfly*)
442 pw usermod "${euser}" -d "${ehome}" || die 442 pw usermod "${euser}" -d "${ehome}" && return 0
443 [[ $? == 8 ]] && eerror "${euser} is in use, cannot update home"
444 eerror "There was an error when attempting to update the home directory for ${euser}"
445 eerror "Please update it manually on your system:"
446 eerror "\t pw usermod \"${euser}\" -d \"${ehome}\""
443 ;; 447 ;;
444 448
445 *) 449 *)
446 usermod -d "${ehome}" "${euser}" || die 450 usermod -d "${ehome}" "${euser}" && return 0
451 [[ $? == 8 ]] && eerror "${euser} is in use, cannot update home"
452 eerror "There was an error when attempting to update the home directory for ${euser}"
453 eerror "Please update it manually on your system (as root):"
454 eerror "\t usermod -d \"${ehome}\" \"${euser}\""
447 ;; 455 ;;
448 esac 456 esac
449
450} 457}
451 458
452fi 459fi

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21

  ViewVC Help
Powered by ViewVC 1.1.20