فهرست منبع

Only create default admin username and password on initial installation

Michael Schloh von Bennewitz 22 سال پیش
والد
کامیت
c6f1cbbb61
1فایلهای تغییر یافته به همراه7 افزوده شده و 5 حذف شده
  1. 7 5
      dss/dss.spec

+ 7 - 5
dss/dss.spec

@@ -293,10 +293,12 @@ AutoReqProv:  no
     rm -rf $RPM_BUILD_ROOT
 
 %post
-    #   write a default admin username and password to qtusers
-    username='ghandi'; password='india'
-    $RPM_INSTALL_PREFIX/bin/qtpasswd -p $password $username
+    if [ $1 -eq 1 ]; then
+        #   after install, write default admin username and password to qtusers
+        username='ghandi'; password='india'
+        $RPM_INSTALL_PREFIX/bin/qtpasswd -p $password $username
 
-    #   add the new admin username to {l_prefix}/etc/dss/qtgroupsusers
-    echo "admin: $username" >$RPM_INSTALL_PREFIX/etc/dss/qtgroups
+        #   add the new admin username to {l_prefix}/etc/dss/qtgroupsusers
+        echo "admin: $username" >$RPM_INSTALL_PREFIX/etc/dss/qtgroups
+    fi