kadischi/post_install_scripts 04userconfig.pl, 1.1, 1.2 07accounts.sh, 1.8, 1.9
Jasper O'neal Hartline (autopsy)
fedora-extras-commits at redhat.com
Wed Jul 5 02:28:58 UTC 2006
Author: autopsy
Update of /cvs/devel/kadischi/post_install_scripts
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv30399/kadischi/post_install_scripts
Modified Files:
04userconfig.pl 07accounts.sh
Log Message:
Minor fixes since rewrites
Index: 04userconfig.pl
===================================================================
RCS file: /cvs/devel/kadischi/post_install_scripts/04userconfig.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- 04userconfig.pl 5 Jul 2006 01:17:00 -0000 1.1
+++ 04userconfig.pl 5 Jul 2006 02:28:56 -0000 1.2
@@ -5,8 +5,7 @@
$SYSDIR = $ARGV[0];
$INTERACTIVE = 1;
-$LOKKIT = "$SYSDIR/usr/sbin/lokkit";
-$NTSYSV = "$SYSDIR/usr/sbin/ntsysv";
+
foreach $i (@ARGV) {
if ($i =~ m/--kickstart/g) {
@@ -27,13 +26,13 @@
$LOKKIT = "$SYSDIR/usr/sbin/lokkit";
$NTSYSV = "$SYSDIR/usr/sbin/ntsysv";
- stat $LOKKIT;
- if ($? == 0) {
- exec("/usr/sbin/chroot $SYSDIR /usr/sbin/lokkit");
+
+ if (-e $LOKKIT) {
+ system("/usr/sbin/chroot $SYSDIR /usr/sbin/lokkit");
}
- stat $NTSYSV;
- if ($? == 0) {
- exec("/usr/sbin/chroot $SYSDIR /usr/sbin/ntsysv --level 35");
+
+ if (-e $NTSYSV) {
+ system("/usr/sbin/chroot $SYSDIR /usr/sbin/ntsysv --level 35");
}
}
Index: 07accounts.sh
===================================================================
RCS file: /cvs/devel/kadischi/post_install_scripts/07accounts.sh,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- 07accounts.sh 26 Jun 2006 15:39:44 -0000 1.8
+++ 07accounts.sh 5 Jul 2006 02:28:56 -0000 1.9
@@ -7,13 +7,13 @@
. /etc/kadischi/kadischi.conf
SYSDIR=$1
-ANACONDA_ARGS=$2
-USING_KICKSTART=$(echo $ANACONDA_ARGS | grep -G [--]kickstart)
-USING_CMDLINE=$(echo $ANACONDA_ARGS | egrep -- "-C|--cmdline")
+ANACONDA_ARGS=$3
+USING_KICKSTART=$(echo $ANACONDA_ARGS | /bin/grep -G [--]kickstart)
+USING_CMDLINE=$(echo $ANACONDA_ARGS | /bin/egrep -- "-C|--cmdline")
-if [ -n $USING_KICKSTART ] || [ -n $USING_CMDLINE ]; then
- echo "Not going to interactive user accounts configuration.."
+if [ -n "$USING_KICKSTART" ] || [ -n "$USING_CMDLINE" ]; then
+ echo "[kadischi]: Not going to interactive user accounts configuration.."
exit 0
else
echo "Going to user accounts configuration.."
@@ -43,8 +43,8 @@
done
fi
else
- if [ -n $USING_KICKSTART ] || [ -n $USING_CMDLINE ]; then
- echo "Not going to interactive user accounts configuration.."
+ if [ -n "$USING_KICKSTART" ] || [ -n "$USING_CMDLINE" ]; then
+ echo "[kadischi]: Not going to interactive user accounts configuration.."
exit 0
else
echo "A non-root user should be created, create one now?"
More information about the fedora-extras-commits
mailing list