Skip to content

Commit

Permalink
All gdisk operations need the piped yes statement.
Browse files Browse the repository at this point in the history
  • Loading branch information
mastacontrola committed Jan 11, 2017
1 parent 7700772 commit 468d5c0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/web/lib/fog/system.class.php
Expand Up @@ -53,7 +53,7 @@ private static function _versionCompare()
public function __construct()
{
self::_versionCompare();
define('FOG_VERSION', '13');
define('FOG_VERSION', '14');
define('FOG_SCHEMA', 245);
define('FOG_BCACHE_VER', 111);
define('FOG_SVN_REVISION', 6052);
Expand Down
2 changes: 1 addition & 1 deletion packages/web/management/languages/messages.pot
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-10 18:54-0500\n"
"POT-Creation-Date: 2017-01-10 19:51-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down
Expand Up @@ -596,14 +596,14 @@ getDesiredPartitionTableType() {
hasHybridMBR() {
local disk="$1"
[[ -z $disk ]] && handleError "No disk passed (${FUNCNAME[0]})\n Args Passed: $*"
local mbr=$(gdisk -l $disk | awk '/^\ *MBR:/{print $2}')
local mbr=$(yes '' | gdisk -l $disk | awk '/^\ *MBR:/{print $2}')
[[ $mbr == hybrid ]] && echo 1 || echo 0
}
# $1 : device name of drive
hasGPT() {
local disk="$1"
[[ -z $disk ]] && handleError "No disk passed (${FUNCNAME[0]})\n Args Passed: $*"
local gpt=$(gdisk -l $disk | awk -F'[(: )]' '/GPT:/ {print $5}')
local gpt=$(yes '' | gdisk -l $disk | awk -F'[(: )]' '/GPT:/ {print $5}')
[[ $gpt == present ]] && hasgpt=1
[[ $gpt == not ]] && hasgpt=0
}
Expand Down

0 comments on commit 468d5c0

Please sign in to comment.