[Groonga-commit] droonga/droonga-engine at 9500b17 [master] Check existence of the user more safely.

Back to archive index

YUKI Hiroshi null+****@clear*****
Fri Sep 5 11:04:23 JST 2014


YUKI Hiroshi	2014-09-05 11:04:23 +0900 (Fri, 05 Sep 2014)

  New Revision: 9500b1778c0a4b14e7d83faa1f1e93ffc9db4813
  https://github.com/droonga/droonga-engine/commit/9500b1778c0a4b14e7d83faa1f1e93ffc9db4813

  Message:
    Check existence of the user more safely.
    
    See: http://sourceforge.jp/projects/groonga/lists/archive/commit/2014-September/025278.html

  Modified files:
    script/install-master.sh
    script/install.sh

  Modified: script/install-master.sh (+2 -1)
===================================================================
--- script/install-master.sh    2014-09-04 19:40:56 +0900 (20b0f74)
+++ script/install-master.sh    2014-09-05 11:04:23 +0900 (2dea1f3)
@@ -22,7 +22,8 @@ exist_user() {
 }
 
 prepare_user() {
-  exist_user $USER || useradd -m $USER
+  id $USER
+  [ ! $? -eq 0 ] && useradd -m $USER
 }
 
 setup_configuration_directory() {

  Modified: script/install.sh (+2 -1)
===================================================================
--- script/install.sh    2014-09-04 19:40:56 +0900 (3b93372)
+++ script/install.sh    2014-09-05 11:04:23 +0900 (f9334eb)
@@ -22,7 +22,8 @@ exist_user() {
 }
 
 prepare_user() {
-  exist_user $USER || useradd -m $USER
+  id $USER
+  [ ! $? -eq 0 ] && useradd -m $USER
 }
 
 setup_configuration_directory() {
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index