32
# we would like to use distro-info, but cannot (LP: #960142)
33
# if it is there, we will use it. if not, we have a behave-alike
34
# that will need SRUs to get new release knowledge
35
if command -v distro-info >/dev/null; then
40
local supported="hardy lucid maverick natty oneiric precise"
42
local stable="oneiric"
43
[ "$(date +%Y%m%d)" -lt 20120426 ] || stable="precise"
46
--devel) echo "$devel";;
47
--stable) echo "$stable";;
50
for d in $supported; do echo "$d"; done
52
*) echo "unknown argument $1"; return 1;;
56
31
# Definitions for supported releases and architectures
57
32
[ -r $(pwd)/etc/maas/import_isos ] && . $(pwd)/etc/maas/import_isos
58
33
[ -r /etc/maas/import_isos ] && . /etc/maas/import_isos
59
[ -n "$RELEASES" ] || RELEASES=$(distro_info --supported)
34
[ -n "$RELEASES" ] || RELEASES=$(distro-info --supported)
60
35
[ -n "$ARCHES" ] || ARCHES="amd64 i386"
61
36
[ -n "$KSDIR" ] || KSDIR="/var/lib/cobbler/kickstarts"
62
37
[ -n "$PRIORITY" ] || PRIORITY="critical"
63
38
[ -n "$LOCALE" ] || LOCALE="en_US"
64
39
[ -n "$INTERFACE" ] || INTERFACE="auto"
65
[ -n "$CONSOLE" ] || CONSOLE="ttyS0,9600n8"
66
[ -n "$KOPTS" ] || KOPTS="priority=$PRIORITY locale=$LOCALE netcfg/choose_interface=$INTERFACE console=$CONSOLE"
40
[ -n "$KOPTS" ] || KOPTS="priority=$PRIORITY locale=$LOCALE netcfg/choose_interface=$INTERFACE"
67
41
[ -n "$ENLIST_PROFILE" ] || ENLIST_PROFILE="maas-enlist"
42
[ -n "$IMPORT_EPHEMERALS" ] || IMPORT_EPHEMERALS=1
68
43
if [ -n "$SERVER_IP" ]; then
69
44
KOPTS="$KOPTS log_host=$SERVER_IP log_port=514"
102
[ "${IMPORT_EPHEMERALS}" = "0" ] || maas-import-ephemerals --import
123
105
add_enlist_profile(){
124
STABLE=$(distro_info --stable)
125
DEVEL=$(distro_info --devel)
106
STABLE=$(distro-info --stable)
107
DEVEL=$(distro-info --devel)
126
108
PARENT_PROFILE=""
128
110
# Check what release to use as parent profile