Add a 'diskInteractive' variable that can be set to interactively partition
and label a disk from a sysinstall script.
This commit is contained in:
parent
55847cbc30
commit
df349781bf
@ -758,7 +758,8 @@ diskPartitionEditor(dialogMenuItem *self)
|
||||
/* Some are already selected */
|
||||
for (i = 0; i < devcnt; i++) {
|
||||
if (devs[i]->enabled) {
|
||||
if (variable_get(VAR_NONINTERACTIVE))
|
||||
if (variable_get(VAR_NONINTERACTIVE) &&
|
||||
!variable_get(VAR_DISKINTERACTIVE))
|
||||
diskPartitionNonInteractive(devs[i]);
|
||||
else
|
||||
diskPartition(devs[i]);
|
||||
@ -769,7 +770,8 @@ diskPartitionEditor(dialogMenuItem *self)
|
||||
/* No disks are selected, fall-back case now */
|
||||
if (devcnt == 1) {
|
||||
devs[0]->enabled = TRUE;
|
||||
if (variable_get(VAR_NONINTERACTIVE))
|
||||
if (variable_get(VAR_NONINTERACTIVE) &&
|
||||
!variable_get(VAR_DISKINTERACTIVE))
|
||||
diskPartitionNonInteractive(devs[0]);
|
||||
else
|
||||
diskPartition(devs[0]);
|
||||
|
@ -163,7 +163,8 @@ diskLabelEditor(dialogMenuItem *self)
|
||||
}
|
||||
else if (cnt) {
|
||||
/* Some are already selected */
|
||||
if (variable_get(VAR_NONINTERACTIVE))
|
||||
if (variable_get(VAR_NONINTERACTIVE) &&
|
||||
!variable_get(VAR_DISKINTERACTIVE))
|
||||
i = diskLabelNonInteractive(NULL);
|
||||
else
|
||||
i = diskLabel(NULL);
|
||||
@ -173,7 +174,8 @@ diskLabelEditor(dialogMenuItem *self)
|
||||
cnt = deviceCount(devs);
|
||||
if (cnt == 1) {
|
||||
devs[0]->enabled = TRUE;
|
||||
if (variable_get(VAR_NONINTERACTIVE))
|
||||
if (variable_get(VAR_NONINTERACTIVE) &&
|
||||
!variable_get(VAR_DISKINTERACTIVE))
|
||||
i = diskLabelNonInteractive(devs[0]);
|
||||
else
|
||||
i = diskLabel(devs[0]);
|
||||
|
@ -93,6 +93,7 @@
|
||||
#define VAR_DEBUG "debug"
|
||||
#define VAR_DESKSTYLE "_deskStyle"
|
||||
#define VAR_DISK "disk"
|
||||
#define VAR_DISKINTERACTIVE "diskInteractive"
|
||||
#define VAR_DISTS "dists"
|
||||
#define VAR_DIST_MAIN "distMain"
|
||||
#define VAR_DIST_CRYPTO "distCRYPTO"
|
||||
|
@ -758,7 +758,8 @@ diskPartitionEditor(dialogMenuItem *self)
|
||||
/* Some are already selected */
|
||||
for (i = 0; i < devcnt; i++) {
|
||||
if (devs[i]->enabled) {
|
||||
if (variable_get(VAR_NONINTERACTIVE))
|
||||
if (variable_get(VAR_NONINTERACTIVE) &&
|
||||
!variable_get(VAR_DISKINTERACTIVE))
|
||||
diskPartitionNonInteractive(devs[i]);
|
||||
else
|
||||
diskPartition(devs[i]);
|
||||
@ -769,7 +770,8 @@ diskPartitionEditor(dialogMenuItem *self)
|
||||
/* No disks are selected, fall-back case now */
|
||||
if (devcnt == 1) {
|
||||
devs[0]->enabled = TRUE;
|
||||
if (variable_get(VAR_NONINTERACTIVE))
|
||||
if (variable_get(VAR_NONINTERACTIVE) &&
|
||||
!variable_get(VAR_DISKINTERACTIVE))
|
||||
diskPartitionNonInteractive(devs[0]);
|
||||
else
|
||||
diskPartition(devs[0]);
|
||||
|
@ -163,7 +163,8 @@ diskLabelEditor(dialogMenuItem *self)
|
||||
}
|
||||
else if (cnt) {
|
||||
/* Some are already selected */
|
||||
if (variable_get(VAR_NONINTERACTIVE))
|
||||
if (variable_get(VAR_NONINTERACTIVE) &&
|
||||
!variable_get(VAR_DISKINTERACTIVE))
|
||||
i = diskLabelNonInteractive(NULL);
|
||||
else
|
||||
i = diskLabel(NULL);
|
||||
@ -173,7 +174,8 @@ diskLabelEditor(dialogMenuItem *self)
|
||||
cnt = deviceCount(devs);
|
||||
if (cnt == 1) {
|
||||
devs[0]->enabled = TRUE;
|
||||
if (variable_get(VAR_NONINTERACTIVE))
|
||||
if (variable_get(VAR_NONINTERACTIVE) &&
|
||||
!variable_get(VAR_DISKINTERACTIVE))
|
||||
i = diskLabelNonInteractive(devs[0]);
|
||||
else
|
||||
i = diskLabel(devs[0]);
|
||||
|
@ -93,6 +93,7 @@
|
||||
#define VAR_DEBUG "debug"
|
||||
#define VAR_DESKSTYLE "_deskStyle"
|
||||
#define VAR_DISK "disk"
|
||||
#define VAR_DISKINTERACTIVE "diskInteractive"
|
||||
#define VAR_DISTS "dists"
|
||||
#define VAR_DIST_MAIN "distMain"
|
||||
#define VAR_DIST_CRYPTO "distCRYPTO"
|
||||
|
Loading…
x
Reference in New Issue
Block a user