+int checkForYaboot(struct grubConfig * config) {
+ /*
+ * This is a simplistic check, trully a placeholder. To properly check if
+ * yaboot is *installed* we'd need to:
+ * 1) get the system boot device (LT_BOOT)
+ * 2) considering it's a raw filesystem, check if the yaboot binary matches
+ * the content on the boot device
+ * 3) if not, copy the binary to a temporary file and run "addnote" on it
+ * 4) check again if binary and boot device contents match
+ */
+ if (!access("/etc/yaboot.conf", R_OK))
+ return 2;
+
+ return 1;
+}
+
static char * getRootSpecifier(char * str) {
char * idx, * rootspec = NULL;
@@ -3579,9 +3595,9 @@ int main(int argc, const char ** argv) {
{ "boot-filesystem", 0, POPT_ARG_STRING, &bootPrefix, 0,
_("filestystem which contains /boot directory (for testing only)"),
_("bootfs") },
-#if defined(__i386__) || defined(__x86_64__)
+#if defined(__i386__) || defined(__x86_64__) || defined (__powerpc64__)
{ "bootloader-probe", 0, POPT_ARG_NONE, &bootloaderProbe, 0,
- _("check if lilo is installed on lilo.conf boot sector") },
+ _("check which bootloader is installed on boot sector") },
#endif
{ "config-file", 'c', POPT_ARG_STRING, &grubConfig, 0,
_("path to grub config file to update ("-" for stdin)"),
@@ -3821,8 +3837,8 @@ int main(int argc, const char ** argv) {
}