diff -Naur systemd-38/configure.ac systemd-38-magellan/configure.ac --- systemd-38/configure.ac 2012-01-11 03:54:34.827806225 +0100 +++ systemd-38-magellan/configure.ac 2012-01-20 00:26:02.649982933 +0100 @@ -400,7 +400,7 @@ AC_PATH_PROG([M4], [m4]) -AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO],[Specify the distribution to target: One of fedora, suse, debian, ubuntu, arch, gentoo, slackware, altlinux or other])) +AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO],[Specify the distribution to target: One of fedora, suse, debian, ubuntu, arch, gentoo, magellan, slackware, altlinux or other])) if test "z$with_distro" = "z"; then if test "$cross_compiling" = yes; then AC_MSG_WARN([Target distribution cannot be reliably detected when cross-compiling. You should specify it with --with-distro (see $0 --help for recognized distros)]) @@ -410,6 +410,7 @@ test -f "/etc/debian_version" && with_distro="debian" test -f "/etc/arch-release" && with_distro="arch" test -f "/etc/gentoo-release" && with_distro="gentoo" + test -f "/etc/mageversion" && with_distro="magellan" test -f "/etc/slackware-version" && with_distro="slackware" test -f "/etc/frugalware-release" && with_distro="frugalware" test -f "/etc/altlinux-release" && with_distro="altlinux" @@ -470,6 +471,13 @@ AC_DEFINE(TARGET_GENTOO, [], [Target is Gentoo]) M4_DEFINES=-DTARGET_GENTOO=1 ;; + magellan) + SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d + SYSTEM_SYSVRCND_PATH=/etc/rc.d + AC_DEFINE(TARGET_MAGELLAN, [], [Target is Magellan]) + M4_DEFINES=-DTARGET_MAGELLAN=1 + have_plymouth=yes + ;; slackware) SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d AC_DEFINE(TARGET_SLACKWARE, [], [Target is Slackware]) @@ -561,6 +569,7 @@ AM_CONDITIONAL(TARGET_DEBIAN_OR_UBUNTU, test x"$with_distro" = xdebian -o x"$with_distro" = xubuntu) AM_CONDITIONAL(TARGET_ARCH, test x"$with_distro" = xarch) AM_CONDITIONAL(TARGET_GENTOO, test x"$with_distro" = xgentoo) +AM_CONDITIONAL(TARGET_MAGELLAN, test x"$with_distro" = xmagellan) AM_CONDITIONAL(TARGET_SLACKWARE, test x"$with_distro" = xslackware) AM_CONDITIONAL(TARGET_FRUGALWARE, test x"$with_distro" = xfrugalware) AM_CONDITIONAL(TARGET_ALTLINUX, test x"$with_distro" = xaltlinux) diff -Naur systemd-38/Makefile.am systemd-38-magellan/Makefile.am --- systemd-38/Makefile.am 2012-01-11 04:01:36.734404653 +0100 +++ systemd-38-magellan/Makefile.am 2012-01-20 00:27:51.279982932 +0100 @@ -109,6 +109,12 @@ -DKBD_SETFONT=\"/usr/bin/setfont\" \ -DDEFAULT_FONT=\"LatArCyrHeb-16\" else +if TARGET_MAGELLAN +AM_CPPFLAGS += \ + -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \ + -DKBD_SETFONT=\"/usr/bin/setfont\" \ + -DDEFAULT_FONT=\"LatArCyrHeb-16\" +else if TARGET_ARCH AM_CPPFLAGS += \ -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \ @@ -152,6 +158,7 @@ endif endif endif +endif endif endif endif diff -Naur systemd-38/src/hostname-setup.c systemd-38-magellan/src/hostname-setup.c --- systemd-38/src/hostname-setup.c 2011-12-30 22:27:35.932528825 +0100 +++ systemd-38-magellan/src/hostname-setup.c 2012-01-20 00:30:22.034982932 +0100 @@ -34,6 +34,8 @@ #define FILENAME "/etc/sysconfig/network" #elif defined(TARGET_SUSE) || defined(TARGET_SLACKWARE) #define FILENAME "/etc/HOSTNAME" +#elif defined(TARGET_MAGELLAN) +#define FILENAME "/etc/hostname" #elif defined(TARGET_ARCH) #define FILENAME "/etc/rc.conf" #elif defined(TARGET_GENTOO) @@ -114,7 +116,7 @@ fclose(f); return r; -#elif defined(TARGET_SUSE) || defined(TARGET_SLACKWARE) +#elif defined(TARGET_SUSE) || defined(TARGET_SLACKWARE) || defined(TARGET_MAGELLAN) return read_and_strip_hostname(FILENAME, hn); #else return -ENOENT; diff -Naur systemd-38/src/locale-setup.c systemd-38-magellan/src/locale-setup.c --- systemd-38/src/locale-setup.c 2011-12-30 22:27:36.446528996 +0100 +++ systemd-38-magellan/src/locale-setup.c 2012-01-20 00:32:20.268982933 +0100 @@ -199,6 +199,35 @@ if (r != -ENOENT) log_warning("Failed to read /etc/profile.env: %s", strerror(-r)); } + +#elif defined(TARGET_Magellan) + /* Magellan's rc-init expects locale variables in /etc/env.d/ + * These files are later compiled by env-rebuild into shell + * export commands at /etc/profile.env, with variables being + * exported by rc-init's runscript (so /etc/rc.d/init.d/) + */ + if (r <= 0 && + (r = parse_env_file("/etc/profile.env", NEWLINE, + "export LANG", &variables[VARIABLE_LANG], + "export LC_ALL", &variables[VARIABLE_LC_ALL], + "export LC_CTYPE", &variables[VARIABLE_LC_CTYPE], + "export LC_NUMERIC", &variables[VARIABLE_LC_NUMERIC], + "export LC_TIME", &variables[VARIABLE_LC_TIME], + "export LC_COLLATE", &variables[VARIABLE_LC_COLLATE], + "export LC_MONETARY", &variables[VARIABLE_LC_MONETARY], + "export LC_MESSAGES", &variables[VARIABLE_LC_MESSAGES], + "export LC_PAPER", &variables[VARIABLE_LC_PAPER], + "export LC_NAME", &variables[VARIABLE_LC_NAME], + "export LC_ADDRESS", &variables[VARIABLE_LC_ADDRESS], + "export LC_TELEPHONE", &variables[VARIABLE_LC_TELEPHONE], + "export LC_MEASUREMENT", &variables[VARIABLE_LC_MEASUREMENT], + "export LC_IDENTIFICATION", &variables[VARIABLE_LC_IDENTIFICATION], + NULL)) < 0) { + + if (r != -ENOENT) + log_warning("Failed to read /etc/profile.env: %s", strerror(-r)); + } + #elif defined(TARGET_MANDRIVA) || defined(TARGET_MAGEIA ) if (r <= 0 && (r = parse_env_file("/etc/sysconfig/i18n", NEWLINE, diff -Naur systemd-38/src/util.c systemd-38-magellan/src/util.c --- systemd-38/src/util.c 2012-01-10 05:03:59.939805559 +0100 +++ systemd-38-magellan/src/util.c 2012-01-20 00:33:48.064982933 +0100 @@ -3770,6 +3770,28 @@ if (!ansi_color) const_color = "1;34"; /* Light Blue for Gentoo */ +#elif defined(TARGET_MAGELLAN) + + if (!pretty_name) { + char *version; + + if ((r = read_one_line_file("/etc/mageversion", &version)) < 0) { + + if (r != -ENOENT) + log_warning("Failed to read /etc/mageversion: %s", strerror(-r)); + } else { + pretty_name = strappend("Magellan-Linux (v", version); + pretty_name = strappend(pretty_name, ")"); + free(version); + + if (!pretty_name) + log_warning("Failed to allocate Debian version string."); + } + } + + if (!ansi_color) + const_color = "1;34"; /* Light Blue for Magellan */ + #elif defined(TARGET_ALTLINUX) if (!pretty_name) { diff -Naur systemd-38/src/vconsole/vconsole-setup.c systemd-38-magellan/src/vconsole/vconsole-setup.c --- systemd-38/src/vconsole/vconsole-setup.c 2011-12-31 19:45:41.716469221 +0100 +++ systemd-38-magellan/src/vconsole/vconsole-setup.c 2012-01-20 00:35:06.833982933 +0100 @@ -371,6 +371,20 @@ log_warning("Failed to read /etc/conf.d/keymaps: %s", strerror(-r)); } +#elif defined(TARGET_MAGELLAN) + if ((r = parse_env_file("/etc/conf.d/keymap", NEWLINE, + "KEYMAP", &vc_keymap, + NULL)) < 0) { + if (r != -ENOENT) + log_warning("Failed to read /etc/conf.d/keymap: %s", strerror(-r)); + } + if ((r = parse_env_file("/etc/conf.d/consolefont", NEWLINE, + "CONSOLEFONT", &vc_font, + NULL)) < 0) { + if (r != -ENOENT) + log_warning("Failed to read /etc/conf.d/consolefont: %s", strerror(-r)); + } + #elif defined(TARGET_MANDRIVA) || defined (TARGET_MAGEIA) if ((r = parse_env_file("/etc/sysconfig/i18n", NEWLINE,