template.sh 464 B

123456789101112131415161718192021
  1. #!/bin/bash
  2. HOSTNAME=
  3. IPADDR=
  4. MAC=
  5. INTERFACE="em1"
  6. PROFILE="CentOS7-x86_64"
  7. cobbler system remove --name=$HOSTNAME 2>&1 > /dev/null
  8. cobbler system add --name=$HOSTNAME --hostname=$HOSTNAME --profile=$PROFILE
  9. cobbler system edit --name=$HOSTNAME --interface=$INTERFACE --mac=$MAC
  10. cobbler system edit --name=$HOSTNAME --kopts="ksdevice=$MAC nomodeset consoleblank=0"
  11. cobbler system edit --name=$HOSTNAME --kopts-post="nomodeset consoleblank=0"
  12. #cobbler sync