[Fai-commit] r4013 - trunk/lib
fai-commit at lists.alioth.debian.org
fai-commit at lists.alioth.debian.org
Mon Sep 25 10:25:57 UTC 2006
Author: lange
Date: 2006-09-25 10:25:56 +0000 (Mon, 25 Sep 2006)
New Revision: 4013
Modified:
trunk/lib/subroutines-linux
Log:
created 10fai if FAI_ALLOW_UNSIGED=1, use ainsl instead of grep and echo
Modified: trunk/lib/subroutines-linux
===================================================================
--- trunk/lib/subroutines-linux 2006-09-25 10:12:55 UTC (rev 4012)
+++ trunk/lib/subroutines-linux 2006-09-25 10:25:56 UTC (rev 4013)
@@ -180,12 +180,19 @@
[ -f /etc/resolv.conf ] && cp /etc/resolv.conf $FAI_ROOT/etc
[ -f /etc/hosts ] && cp /etc/hosts $FAI_ROOT/etc
# set hostname in $FAI_ROOT
- if [ -f /var/run/fai//FAI_INSTALLATION_IN_PROGRESS ]; then
+ if [ -f /var/run/fai/FAI_INSTALLATION_IN_PROGRESS ]; then
echo $HOSTNAME >$FAI_ROOT/etc/hostname
if [ -n "$IPADDR" ]; then
- grep -q $IPADDR $FAI_ROOT/etc/hosts 2>/dev/null || echo -e "$IPADDR\t$HOSTNAME.$DOMAIN $HOSTNAME" >>$FAI_ROOT/etc/hosts
+ ainsl -s $FAI_ROOT/etc/hosts "$IPADDR $HOSTNAME.$DOMAIN $HOSTNAME"
fi
fi
+
+ if [ X$FAI_ALLOW_UNSIGNED = X1 ]; then
+ cat <<EOF > $FAI_ROOT/etc/apt/apt.conf.d/10fai
+APT::Get::AllowUnauthenticated "true";
+Aptitude::CmdLine::Ignore-Trust-Violations yes;
+EOF
+ fi
[ -d $FAI_ETC_DIR/apt ] && cp -r $FAI_ETC_DIR/apt/* $FAI_ROOT/etc/apt/
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -220,7 +227,7 @@
fi
# undo fake of all programs made by fai
fai-divert -R
- rm -f $FAI_ROOT/etc/apt/apt.conf.d/10fai $FAI_ROOT/etc/apt/apt.conf.d/90fai
+ rm -f $FAI_ROOT/etc/apt/apt.conf.d/{10,90}fai
date
echo "The $FAI_ACTION took $[$(cut -d . -f 1 /proc/uptime)-$start_seconds] seconds."
}
More information about the Fai-commit
mailing list