~hamo/ubuntu/precise/grub2/grub2.hi_res

« back to all changes in this revision

Viewing changes to util/grub-mkconfig.in

ImportĀ upstreamĀ versionĀ 1.97~beta3

Show diffs side-by-side

added added

removed removed

Lines of Context:
141
141
fi
142
142
 
143
143
case x${GRUB_TERMINAL_OUTPUT} in
144
 
  x)
 
144
  x | xgfxterm)
145
145
    # If this platform supports gfxterm, try to use it.
146
146
    if test -e ${grub_prefix}/gfxterm.mod ; then
147
 
      GRUB_TERMINAL_OUTPUT=gfxterm
 
147
      GRUB_VIDEO_BACKEND=
 
148
      for i in vbe ; do
 
149
        if test -e ${grub_prefix}/$i.mod ; then
 
150
          GRUB_VIDEO_BACKEND=$i
 
151
          break
 
152
        fi
 
153
      done
 
154
      if [ -n "${GRUB_VIDEO_BACKEND}" ] ; then
 
155
        GRUB_TERMINAL_OUTPUT=gfxterm
 
156
      elif [ "${GRUB_TERMINAL_OUTPUT}" = "gfxterm" ] ; then
 
157
        echo "No suitable backend could be found for gfxterm." >&2 ; exit 1
 
158
      fi
148
159
    fi
149
160
  ;;
150
 
  xconsole | xserial | xofconsole | xgfxterm) ;;
 
161
  xconsole | xserial | xofconsole) ;;
151
162
  *) echo "Invalid output terminal \"${GRUB_TERMINAL_OUTPUT}\"" >&2 ; exit 1 ;;
152
163
esac
153
164
 
190
201
 
191
202
# These are defined in this script, export them here so that user can
192
203
# override them.
193
 
export GRUB_DEVICE GRUB_DEVICE_UUID GRUB_DEVICE_BOOT GRUB_DEVICE_BOOT_UUID GRUB_FS GRUB_FONT_PATH GRUB_PRELOAD_MODULES
 
204
export GRUB_DEVICE \
 
205
  GRUB_DEVICE_UUID \
 
206
  GRUB_DEVICE_BOOT \
 
207
  GRUB_DEVICE_BOOT_UUID \
 
208
  GRUB_FS \
 
209
  GRUB_FONT_PATH \
 
210
  GRUB_PRELOAD_MODULES \
 
211
  GRUB_VIDEO_BACKEND
194
212
 
195
213
# These are optional, user-defined variables.
196
 
export GRUB_DEFAULT GRUB_TIMEOUT GRUB_DISTRIBUTOR GRUB_CMDLINE_LINUX GRUB_CMDLINE_LINUX_DEFAULT GRUB_TERMINAL_INPUT GRUB_TERMINAL_OUTPUT GRUB_SERIAL_COMMAND GRUB_DISABLE_LINUX_UUID GRUB_DISABLE_LINUX_RECOVERY GRUB_GFXMODE
 
214
export GRUB_DEFAULT \
 
215
  GRUB_HIDDEN_TIMEOUT \
 
216
  GRUB_HIDDEN_TIMEOUT_QUIET \
 
217
  GRUB_TIMEOUT \
 
218
  GRUB_DISTRIBUTOR \
 
219
  GRUB_CMDLINE_LINUX \
 
220
  GRUB_CMDLINE_LINUX_DEFAULT \
 
221
  GRUB_TERMINAL_INPUT \
 
222
  GRUB_TERMINAL_OUTPUT \
 
223
  GRUB_SERIAL_COMMAND \
 
224
  GRUB_DISABLE_LINUX_UUID \
 
225
  GRUB_DISABLE_LINUX_RECOVERY \
 
226
  GRUB_GFXMODE \
 
227
  GRUB_DISABLE_OS_PROBER
197
228
 
198
229
if test "x${grub_cfg}" != "x"; then
199
230
  rm -f ${grub_cfg}.new
201
232
 
202
233
  # Allow this to fail, since /boot/grub/ might need to be fatfs to support some
203
234
  # firmware implementations (e.g. OFW or EFI).
204
 
  chmod 444 ${grub_cfg}.new || true
 
235
  chmod 400 ${grub_cfg}.new || grub_warn "Could not make ${grub_cfg}.new readable by only root.\
 
236
  This means that if the generated config contains a password it is readable by everyone"
205
237
fi
206
238
echo "Generating grub.cfg ..." >&2
207
239