kadischi/post_install_scripts 04userconfig.py, 1.5, 1.6 07accounts.sh, 1.1, 1.2

Jasper O'neal Hartline (autopsy) fedora-extras-commits at redhat.com
Thu Apr 20 16:12:38 UTC 2006


Author: autopsy

Update of /cvs/devel/kadischi/post_install_scripts
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv16605/kadischi/post_install_scripts

Modified Files:
	04userconfig.py 07accounts.sh 
Log Message:
Minor changes, break dependancy of lokkit and ntsysv both being present.


Index: 04userconfig.py
===================================================================
RCS file: /cvs/devel/kadischi/post_install_scripts/04userconfig.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- 04userconfig.py	18 Apr 2006 00:20:42 -0000	1.5
+++ 04userconfig.py	20 Apr 2006 16:12:36 -0000	1.6
@@ -24,16 +24,26 @@
             flc_log("Skipping interactive user configuration..")
             sys.exit(0)
 
-    if (lokkit and ntsysv) == True:
-        flc_log("Taking you to interactive user configuration..")
+    if lokkit:
+        flc_log("Taking you to interactive firewalling configuration..")
         run("chroot %s %s" % (sysdir, "/usr/sbin/lokkit"))
+    else:
+        flc_log("lokkit can't be found, skipping firewalling configuration..")
+
+    if ntsysv:
+        flc_log("Taking you to interactive services configuration..")
         run("chroot %s %s" % (sysdir, "/usr/sbin/ntsysv --level 35"))
     else:
-        flc_log("Skipping interactive user configuration..")
+        flc_log("ntsysv can't be found, skipping services configuration..")
 else:
-    if (lokkit and ntsysv) == True:
-        flc_log("Taking you to interactive user configuration..")
+    if lokkit:
+        flc_log("Taking you to interactive firewalling configuration..")
         run("chroot %s %s" % (sysdir, "/usr/sbin/lokkit"))
+    else:
+        flc_log("lokkit can't be found, skipping firewalling configuration..")
+
+    if ntsysv:
+        flc_log("Taking you to interactive services configuration..")
         run("chroot %s %s" % (sysdir, "/usr/sbin/ntsysv --level 35"))
     else:
-        flc_log("Skipping interactive user configuration..")
+        flc_log("ntsysv can't be found, skipping interactive services configuration..")


Index: 07accounts.sh
===================================================================
RCS file: /cvs/devel/kadischi/post_install_scripts/07accounts.sh,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- 07accounts.sh	18 Apr 2006 00:21:33 -0000	1.1
+++ 07accounts.sh	20 Apr 2006 16:12:36 -0000	1.2
@@ -1,7 +1,7 @@
 #!/bin/bash
 #
 # Allow creation of addition user accounts.
-# UIDs start at 500, GID is 100.
+# We will let useradd handle with defaults.
 
 
  . /etc/kadischi/kadischi.conf
@@ -10,7 +10,7 @@
 ANACONDA_ARGS=$2
 USING_KICKSTART=$(echo $ANACONDA_ARGS | grep -G [--]kickstart)
 USING_CMDLINE=$(echo $ANACONDA_ARGS | egrep -- "-C|--cmdline")
-i=0
+
 
 
 if [ $USING_KICKSTART ] || [ $USING_CMDLINE ]; then   
@@ -26,13 +26,13 @@
          echo -n "User shell: "
          read NEWSHELL
          if [ -n $NEWUSERNAME ] && [ -n $NEWSHELL ]; then
-            chroot $SYSDIR /usr/sbin/useradd -d /home/$NEWUSERNAME -m -s $NEWSHELL -u 50$i -g 100 $NEWUSERNAME
+            chroot $SYSDIR /usr/sbin/useradd -d /home/$NEWUSERNAME -m -s $NEWSHELL -g 100 $NEWUSERNAME
             chroot $SYSDIR /usr/bin/passwd $NEWUSERNAME
-            echo "User: $NEWUSERNAME, UID: 50$i, GID: 100 created successfully."
-            (( i += 1 ))
+            echo "User: $NEWUSERNAME, Home: /home/$NEWUSERNAME, GID: 100 created successfully."
          else
             echo "Username or shell wasn't specified."
          fi
+         echo "                                      "
          echo "Would you like to create another user?"
          echo -n "[yes/no] "
          read CHOICE
@@ -41,4 +41,3 @@
       exit 0
    fi
 fi
-




More information about the scm-commits mailing list