public inbox for cygwin-apps-cvs@sourceware.org
help / color / mirror / Atom feed
* [csih - Cygwin service installation helper, a helper script and tools to create service installation scripts] branch master, updated. v0_9_9-4-gc3aa664
@ 2017-06-07 14:34 corinna
  0 siblings, 0 replies; only message in thread
From: corinna @ 2017-06-07 14:34 UTC (permalink / raw)
  To: cygwin-apps-cvs




https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/csih.git;h=c3aa664a4e79f35442ce264590833ca9242077e5

commit c3aa664a4e79f35442ce264590833ca9242077e5
Author: J.H. van de Water <houder@xs4all.nl>
Date:   Wed Jun 7 13:36:27 2017 +0200

    Move call of mkpasswd UPwards in csih_create_privileged_user
    
    Move call of mkpasswd UPwards in csih_create_privileged_user, and place it
    before the 1st call of passwd.

https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/csih.git;h=f2b4d281f566eb47b3d1aa8b09c268aabd257fce

commit f2b4d281f566eb47b3d1aa8b09c268aabd257fce
Author: J.H. van de Water <houder@xs4all.nl>
Date:   Wed Jun 7 13:28:21 2017 +0200

    Amend prologue of csih_use_file_etc
    
    Prologue (bottom) of csih_use_file_etc should state:
    
        Returns 1 if files shall be used, 0 otherwise.
    
    Currently it states the reverse.


Diff:
---
 cygwin-service-installation-helper.sh |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/cygwin-service-installation-helper.sh b/cygwin-service-installation-helper.sh
index a0b6216..14a40c1 100755
--- a/cygwin-service-installation-helper.sh
+++ b/cygwin-service-installation-helper.sh
@@ -2566,7 +2566,7 @@ readonly -f csih_old_cygwin
 #
 #     Otherwise, we need the files.
 #
-#   Returns 0 if files shall be used, 1 otherwise.
+#   Returns 1 if files shall be used, 0 otherwise.
 # ======================================================================
 csih_use_file_etc()
 {
@@ -3003,6 +3003,12 @@ csih_create_privileged_user()
 	  csih_inform "the '${csih_PRIVILEGED_USERNAME}' account."
 	  echo ""
 
+          # If we use /etc account DB only, write new account to /etc/passwd
+          if csih_use_file_etc passwd
+          then
+            /usr/bin/mkpasswd -l -u "${csih_PRIVILEGED_USERNAME}" >> "${SYSCONFDIR}/passwd"
+          fi
+
 	  if ! passwd -e "${csih_PRIVILEGED_USERNAME}" >/dev/null
 	  then
 	    csih_warning "Setting password expiry for user '${csih_PRIVILEGED_USERNAME}' failed!"
@@ -3063,12 +3069,6 @@ csih_create_privileged_user()
         fi
       fi
 
-      # If we use /etc account DB only, write new account to /etc/passwd
-      if csih_use_file_etc passwd
-      then
-	/usr/bin/mkpasswd -l -u "${csih_PRIVILEGED_USERNAME}" >> "${SYSCONFDIR}/passwd"
-      fi
-
       return "${ret}"
     fi # ! username_in_sam
     return 1 # failed to create user (or prevented by auto-answer veto)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-06-07 14:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-07 14:34 [csih - Cygwin service installation helper, a helper script and tools to create service installation scripts] branch master, updated. v0_9_9-4-gc3aa664 corinna

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).