Merge branch 'upstream'
[automated-distro-installer] / fai / config / scripts / ROCKY / 80-misc
diff --git a/fai/config/scripts/ROCKY/80-misc b/fai/config/scripts/ROCKY/80-misc
new file mode 100755 (executable)
index 0000000..09c8d49
--- /dev/null
@@ -0,0 +1,21 @@
+#! /bin/bash
+
+error=0 ; trap "error=$((error|1))" ERR
+
+# add a $username user account
+if [ -n "$username" ]; then
+    if ! $ROOTCMD getent passwd $username ; then
+       $ROOTCMD adduser -c "$username user" $username
+       $ROOTCMD usermod -p "$USERPW" $username
+    fi
+fi
+
+# enable graphical login screen, make run level 5 as default
+if [ -f $target/usr/sbin/gdm ]; then
+    fai-sed 's/id:3:initdefault:/id:5:initdefault:/' /etc/inittab
+    # do not run this tool
+    echo "RUN_FIRSTBOOT=NO" > $target/etc/sysconfig/firstboot
+fi
+
+exit $error
+