compass-adapters/cobbler/scripts/suse_early_default.bak
xiaodongwang 1b3faedded add initial version of suse support
Change-Id: If960011e7ac8996ce1c0365b9dd06ed89b26fa8a
2015-03-03 22:51:03 -08:00

31 lines
885 B
Plaintext

# Start suse_early_default
# This script is not run in the chroot /target by default
#if $getVar('system_name','') != ''
#set $what = "system"
#else
#set $what = "profile"
#end if
$SNIPPET('suse_pre_log')
$SNIPPET('suse_pre_install_network')
$SNIPPET('suse_pre_partition_disks')
$SNIPPET('suse_pre_anamon')
wget -O- http://$http_server/cblr/svc/op/ks/$what/$name | sed -e 's/&/\&/g' | sed -e 's/&/\&/g' > /tmp/modified.xml
cp -f /tmp/modified.xml /tmp/profile/modified.xml
cat << EOF > /tmp/expand_entity.sh
#raw
#!/bin/bash
sed -i "/&\$1;/ {
r /tmp/profile/\$1.xml
d
}" \$2
#end raw
EOF
chmod ugo+x /tmp/expand_entity.sh
/tmp/expand_entity.sh network /tmp/profile/modified.xml
/tmp/expand_entity.sh partition /tmp/profile/modified.xml
/tmp/expand_entity.sh bootloader /tmp/profile/modified.xml
while [ ! -f /tmp/break ]; do
sleep 10
done
# End suse_early_default