You'll get two buttons unless you define a single button (or three or more)
A test to make sure the var is not empty would also be good. Instead of entering sda6, you'd have to enter /dev/sda6, which is in line with the way partitions are entered in the cli installer.
- Code: Select all
if [[ -z $new_target_var ]] ; then
exit 0
fi
Without that test, mount would complain about a missing argument.
To get the tabs into fstab...
- Code: Select all
echo -e "UUID=`blkid -o value -s UUID $new-target-var`\t /var\text3\tdefaults,noatime\t0\t2" >>
I just tested the dialog box on the command line. Two things: the value is followed by a pipe that would need to be stripped out, and if you hit ENTER instead of clicking on OK, then there's also "\n" added to the output. If you're ambitious, you could lift out the partition selection code from the script and modify it to fit this case. If I get a little bit more ambitious (and have the time) you'll get a simple script with a variable or two in the head. If you use the expert install option, you'll be shown the names of the pre- and post-install scripts in the options selection window, so you have a chance to disable all the post-install scripts or make that one not executable or move it.
A second variable could be added - the directory you want to move to another partition. In case someone wants to move /usr or other.