Red Hat Kickstart Skipt Probleme!

D

dietervsw

Grünschnabel
Hallo,
ich muss ein paar Zeile auf ein Kickstart Instalation Datei in eine bestimte Position hinzufügen.
Ich habe eine auf eine unsaubare Lösung gedacht:
Die Probleme auf meine Lösung sind:
Ich muss immer den Skipt ändern wenn ich etwas von Zeile 1 bis 26 geändert wird.
Hättet ihr viellecht eine saubare Lösung?
Vielen Dank im voraus!

Hier den Code:

# Save iptables logs to firewall
# 1. bis 26. Zeilen werden auf tmp.txt geschrieben
sed -n ´1,26p´ /etc/syslog.conf >> tmp.txt
# fügt eine "blank line" hinzu
echo -e "\n" >> tmp.txt
# Die zeilen sind nach der 26. Zeile hinzugefügt
echo " save iptables logs to firewall.log" >> tmp.txt
echo " kern.=debug /var/log/firewall.log " >> tmp.txt
# Die zeilen von 27 bis ende sind auf dem tmp.txt hinzugefügt
sed -n ´27,$p´ /etc/syslog.conf >> tmp.txt
# tmp.txt wird auf /etc/syslog.conf kopiert und danach gelöscht
mv tmp.txt /etc/syslog.conf
 

Ähnliche Themen

iptables Problem auf Linux vServer

Displayport + externer Monitor zeigt bei startx nichts erst bei DVI

sed im script per crontab

Ubuntu X / dbus problem

Mondorescue über Cron-Job

Zurück
Oben