Commit 22d9cc72 authored by Leigh B Stoller's avatar Leigh B Stoller

Merge remote-tracking branch 'central/master' into imagealiases

parents 7ae33f71 3badea66
......@@ -62,6 +62,10 @@ my $GPTUNUSED = "00000000-0000-0000-0000-000000000000";
my $GPTLINUXDATA = "0FC63DAF-8483-4772-8E79-3D69D8477DE4";
my $GPTLINUXLVM = "E6D6D379-F507-44C2-A23C-238F2A3DF928";
# Does the partitioned device have a 'p' before the partition number?
# We try to detect that, rather than hardcoding specific formats.
my $NEEDSPFORMAT = 0;
#
# Turn off line buffering on output
#
......@@ -157,16 +161,44 @@ if (!$lvm || ($lvm && $lmonster)) {
if (defined($diskopt)) {
$disk = $diskopt;
$disk =~ s/^\/dev\///;
if ($disk =~ /^nvme\dn\d+$/) {
$NEEDSPFORMAT = 1;
}
}
else {
my $rootdev = `df | egrep '/\$' | grep -v rootfs`;
if ($rootdev =~ /^\/dev\/([a-z]+)\d+\s+/) {
$disk = $1;
print "disk = $disk\n";
}
elsif ($rootdev =~ /^\/dev\/(nvme\dn\d+)p\d+\s+/) {
$disk = $1;
$NEEDSPFORMAT = 1;
print "nvme disk = $disk\n";
}
else {
my $rpartdev = `blkid -L /`;
chomp($rpartdev);
if ($? == 0 && $rpartdev =~ /^\/dev\/(.*)$/) {
my $bpath = `readlink -f /sys/class/block/$1`;
chomp($bpath);
if ($? == 0) {
if ($bpath =~ /.+\/([^\/]+)\/([^\/]+)$/) {
$disk = "$1";
if ($disk =~ /^nvme\dn\d+$/) {
$NEEDSPFORMAT = 1;
}
}
}
}
}
}
my $diskdev = "/dev/${disk}";
my $fsdevice = "${diskdev}${slice}";
if ($NEEDSPFORMAT) {
$fsdevice = "${diskdev}p${slice}";
}
#
# For LVM, just exit if the physical volume already exists
......
......@@ -7161,6 +7161,8 @@ outfiles="$outfiles clientside/GNUmakefile clientside/setversion \
clientside/tmcc/ubuntu11/GNUmakefile \
clientside/tmcc/ubuntu14/GNUmakefile \
clientside/tmcc/ubuntu15/GNUmakefile \
clientside/tmcc/ubuntu16/GNUmakefile \
clientside/tmcc/ubuntu16-ms/GNUmakefile \
clientside/tmcc/linux-ms/GNUmakefile \
clientside/tmcc/freebsd5/GNUmakefile clientside/tmcc/freebsd5/supfile \
clientside/tmcc/freebsd6/GNUmakefile clientside/tmcc/freebsd6/supfile \
......
......@@ -1495,6 +1495,8 @@ outfiles="$outfiles clientside/GNUmakefile clientside/setversion \
clientside/tmcc/ubuntu11/GNUmakefile \
clientside/tmcc/ubuntu14/GNUmakefile \
clientside/tmcc/ubuntu15/GNUmakefile \
clientside/tmcc/ubuntu16/GNUmakefile \
clientside/tmcc/ubuntu16-ms/GNUmakefile \
clientside/tmcc/linux-ms/GNUmakefile \
clientside/tmcc/freebsd5/GNUmakefile clientside/tmcc/freebsd5/supfile \
clientside/tmcc/freebsd6/GNUmakefile clientside/tmcc/freebsd6/supfile \
......
This diff is collapsed.
......@@ -82,7 +82,7 @@ my $SERVERVERSION = 1;
#
my @X86TYPES = ("C240M4","C220M4","pcvm","r320","c6220","dl360","r720",
"c8220","c8220x","d2100","d710","d820","d430","pc3000",
"c220g2", "c6320");
"c220g2", "c6320", "m510");
# We are using a different DB.
my $DB;
......
......@@ -57,7 +57,8 @@ $optargs = OptionalPageArguments("create", PAGEARG_STRING,
"project", PAGEARG_PROJECT,
"asguest", PAGEARG_BOOLEAN,
"default", PAGEARG_STRING,
"classic", PAGEARG_STRING,
"classic", PAGEARG_STRING,
"from", PAGEARG_STRING,
"formfields", PAGEARG_ARRAY);
if ($ISAPT && !$this_user) {
......@@ -80,6 +81,11 @@ if ($ISAPT && !$this_user) {
}
}
$skipfirststep = 0;
if (isset($from) && ($from == "manage-profile" || $from == "show-profile")) {
$skipfirststep = 1;
}
#
# Alternate version of the picker, temporary.
#
......@@ -333,7 +339,7 @@ function SPITFORM($formfields, $newuser, $errors)
{
global $TBBASE, $APTMAIL, $ISAPT, $ISCLOUD, $ISPNET, $PORTAL_NAME;
global $profile_array, $this_user, $profilename, $profile, $am_array;
global $projlist, $classic, $TBMAINSITE;
global $projlist, $skipfirststep, $classic, $TBMAINSITE;
$amlist = array();
$fedlist = array();
......@@ -434,6 +440,7 @@ function SPITFORM($formfields, $newuser, $errors)
$doconstraints = (isset($this_user) &&
(ISADMINISTRATOR() || STUDLY()) ? 1 : 0);
echo " window.DOCONSTRAINTS = 1;\n";
echo " window.SKIPFIRSTSTEP = " . ($skipfirststep ? "true" : "false") . ";\n";
echo " window.PORTAL_NAME = '$PORTAL_NAME';\n";
echo " window.CLASSIC = " . ($classic ? "true" : "false") . ";\n";
echo "</script>\n";
......
......@@ -204,6 +204,7 @@ function (_, Constraints, sup, ppstart, JacksEditor, wt,
return Instantiate(this, event);
},
});
// This activates the popover subsystem.
$('[data-toggle="popover"]').popover({
trigger: 'hover',
......@@ -368,7 +369,12 @@ function (_, Constraints, sup, ppstart, JacksEditor, wt,
var startProfile = $('#profile_name li[value = ' + window.PROFILE + ']:first');
ChangeProfileSelection(startProfile);
_.delay(function () {$('.dropdown-toggle').dropdown();}, 500);
_.delay(function () {
$('.dropdown-toggle').dropdown();
if (window.SKIPFIRSTSTEP) {
$('#stepsContainer').steps('next');
}
}, 500);
// Set up the click function for expanding and collapsing profile groups
$('#profile_name > span').click(function() {
......
......@@ -479,7 +479,7 @@ function (_, sup, filesize, JacksEditor, ShowImagingModal, moment, aptforms,
*/
$('#profile_instantiate_button').click(function (event) {
window.location.replace("instantiate.php?profile=" +
version_uuid);
version_uuid + "&from=manage-profile");
});
/*
......
......@@ -180,7 +180,7 @@ function (_, sup, moment,
*/
$('#profile_instantiate_button').click(function (event) {
window.location.replace("instantiate.php?profile=" +
version_uuid);
version_uuid + "&from=show-profile");
});
// Handler for normal instantiate submit button, which is in
// the modal.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment