diff -Naur systemd-9/configure.ac systemd-9-magellan/configure.ac --- systemd-9/configure.ac 2010-09-03 04:49:55.000000000 +0200 +++ systemd-9-magellan/configure.ac 2010-09-15 15:47:42.000000000 +0200 @@ -245,7 +245,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, arch, gentoo, slackware or other])) +AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO],[Specify the distribution to target: One of fedora, suse, debian, arch, gentoo, magellan, slackware 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)]) @@ -255,6 +255,7 @@ AC_CHECK_FILE(/etc/debian_version,with_distro="debian") AC_CHECK_FILE(/etc/arch-release,with_distro="arch") AC_CHECK_FILE(/etc/gentoo-release,with_distro="gentoo") + AC_CHECK_FILE(/etc/mageversion,with_distro="magellan") AC_CHECK_FILE(/etc/slackware-version,with_distro="slackware") fi if test "z$with_distro" = "z"; then @@ -314,6 +315,13 @@ AC_DEFINE(TARGET_GENTOO, [], [Target is Gentoo]) M4_DISTRO_FLAG=-DTARGET_GENTOO=1 ;; + magellan) + SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d + SYSTEM_SYSVRCND_PATH=/etc/rc.d + SPECIAL_SYSLOG_SERVICE=syslog-ng.service + AC_DEFINE(TARGET_MAGELLAN, [], [Target is Magellan]) + M4_DISTRO_FLAG=-DTARGET_MAGELLAN=1 + ;; slackware) SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d SYSTEM_SYSVRCND_PATH=/etc/rc.d @@ -361,6 +369,7 @@ AM_CONDITIONAL(TARGET_DEBIAN, test x"$with_distro" = xdebian) 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) AC_DEFINE_UNQUOTED(SPECIAL_SYSLOG_SERVICE, ["$SPECIAL_SYSLOG_SERVICE"], [Syslog service name]) diff -Naur systemd-9/Makefile.am systemd-9-magellan/Makefile.am --- systemd-9/Makefile.am 2010-09-03 05:07:34.000000000 +0200 +++ systemd-9-magellan/Makefile.am 2010-09-15 15:47:42.000000000 +0200 @@ -247,6 +247,15 @@ units/gentoo/xdm.service endif +if TARGET_MAGELLAN +dist_systemunit_DATA += \ + units/magellan/halt.service \ + units/magellan/sendsignals.service \ + units/magellan/poweroff.service \ + units/magellan/reboot.service \ + units/magellan/xdm.service +endif + if TARGET_ARCH dist_systemunit_DATA += \ units/arch/sysinit.service \ @@ -952,6 +961,14 @@ rm -f xdm.service && \ $(LN_S) $(systemunitdir)/xdm.service xdm.service ) endif +if TARGET_MAGELLAN + ( cd $(DESTDIR)$(pkgsysconfdir)/system && \ + rm -f display-manager.service && \ + $(LN_S) $(systemunitdir)/xdm.service display-manager.service ) + ( cd $(DESTDIR)$(pkgsysconfdir)/system/graphical.target.wants && \ + rm -f xdm.service && \ + $(LN_S) $(systemunitdir)/xdm.service xdm.service ) +endif if !TARGET_SUSE ( cd $(DESTDIR)$(systemunitdir) && \ rm -f fsck.target && \ diff -Naur systemd-9/src/hostname-setup.c systemd-9-magellan/src/hostname-setup.c --- systemd-9/src/hostname-setup.c 2010-09-03 00:21:17.000000000 +0200 +++ systemd-9-magellan/src/hostname-setup.c 2010-09-15 15:47:42.000000000 +0200 @@ -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) @@ -137,7 +139,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-9/src/util.c systemd-9-magellan/src/util.c --- systemd-9/src/util.c 2010-09-03 00:21:17.000000000 +0200 +++ systemd-9-magellan/src/util.c 2010-09-15 15:47:42.000000000 +0200 @@ -2835,6 +2835,17 @@ status_printf("Welcome to \x1B[0;32m%s\x1B[0m!\n", r); /* Green for SUSE */ free(r); +#elif defined(TARGET_MAGELLAN) + char *r; + + if (read_one_line_file("/etc/gentoo-release", &r) < 0) + return; + + truncate_nl(r); + + status_printf("Welcome to \x1B[1;34mMAGELLAN (v%s) Linux\x1B[0m!\n", r); /* Light Blue for Magellan */ + + free(r); #else #warning "You probably should add a welcome text logic here." #endif diff -Naur systemd-9/units/getty@.service.m4 systemd-9-magellan/units/getty@.service.m4 --- systemd-9/units/getty@.service.m4 2010-08-26 02:57:31.000000000 +0200 +++ systemd-9-magellan/units/getty@.service.m4 2010-09-15 15:47:42.000000000 +0200 @@ -9,6 +9,7 @@ m4_ifdef(`TARGET_SUSE', `m4_define(`GETTY', `/sbin/mingetty')')m4_dnl m4_ifdef(`TARGET_DEBIAN', `m4_define(`GETTY', `/sbin/getty 38400')')m4_dnl m4_ifdef(`TARGET_GENTOO', `m4_define(`GETTY', `/sbin/agetty 38400')')m4_dnl +m4_ifdef(`TARGET_MAGELLAN', `m4_define(`GETTY', `/sbin/agetty 38400')')m4_dnl m4_ifdef(`TARGET_ARCH', `m4_define(`GETTY', `/sbin/agetty -8 38400')')m4_dnl m4_dnl [Unit] diff -Naur systemd-9/units/graphical.target.m4 systemd-9-magellan/units/graphical.target.m4 --- systemd-9/units/graphical.target.m4 2010-08-30 23:03:58.000000000 +0200 +++ systemd-9-magellan/units/graphical.target.m4 2010-09-15 15:47:42.000000000 +0200 @@ -20,6 +20,9 @@ m4_ifdef(`TARGET_SUSE', Names=runlevel5.target )m4_dnl +m4_ifdef(`TARGET_MAGELLAN', +Names=runlevel5.target +)m4_dnl AllowIsolate=yes [Install] diff -Naur systemd-9/units/magellan/halt.service systemd-9-magellan/units/magellan/halt.service --- systemd-9/units/magellan/halt.service 1970-01-01 01:00:00.000000000 +0100 +++ systemd-9-magellan/units/magellan/halt.service 2010-09-15 15:47:42.000000000 +0200 @@ -0,0 +1,19 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. + +[Unit] +Description=Halt +DefaultDependencies=no +Requires=shutdown.target umount.target sendsignals.service +After=shutdown.target umount.target sendsignals.service + +[Service] +Type=oneshot +RemainAfterExit=yes +Environment=RUNLEVEL=0 +ExecStart=/etc/init.d/halt start +StandardOutput=tty diff -Naur systemd-9/units/magellan/poweroff.service systemd-9-magellan/units/magellan/poweroff.service --- systemd-9/units/magellan/poweroff.service 1970-01-01 01:00:00.000000000 +0100 +++ systemd-9-magellan/units/magellan/poweroff.service 2010-09-15 15:47:42.000000000 +0200 @@ -0,0 +1,19 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. + +[Unit] +Description=Power-Off +DefaultDependencies=no +Requires=shutdown.target umount.target sendsignals.service +After=shutdown.target umount.target sendsignals.service + +[Service] +Type=oneshot +RemainAfterExit=yes +Environment=RUNLEVEL=0 +ExecStart=/etc/init.d/halt start +StandardOutput=tty diff -Naur systemd-9/units/magellan/reboot.service systemd-9-magellan/units/magellan/reboot.service --- systemd-9/units/magellan/reboot.service 1970-01-01 01:00:00.000000000 +0100 +++ systemd-9-magellan/units/magellan/reboot.service 2010-09-15 15:47:42.000000000 +0200 @@ -0,0 +1,19 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. + +[Unit] +Description=Reboot +DefaultDependencies=no +Requires=shutdown.target umount.target sendsignals.service +After=shutdown.target umount.target sendsignals.service + +[Service] +Type=oneshot +RemainAfterExit=yes +Environment=RUNLEVEL=6 +ExecStart=/etc/init.d/reboot start +StandardOutput=tty diff -Naur systemd-9/units/magellan/sendsignals.service systemd-9-magellan/units/magellan/sendsignals.service --- systemd-9/units/magellan/sendsignals.service 1970-01-01 01:00:00.000000000 +0100 +++ systemd-9-magellan/units/magellan/sendsignals.service 2010-09-15 15:47:42.000000000 +0200 @@ -0,0 +1,18 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. + +[Unit] +Description=Kill All Processes +DefaultDependencies=no +After=shutdown.target +RefuseManualStart=yes + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=-/etc/init.d/sendsignals start +StandardOutput=tty diff -Naur systemd-9/units/magellan/xdm.service systemd-9-magellan/units/magellan/xdm.service --- systemd-9/units/magellan/xdm.service 1970-01-01 01:00:00.000000000 +0100 +++ systemd-9-magellan/units/magellan/xdm.service 2010-09-15 15:47:42.000000000 +0200 @@ -0,0 +1,17 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. + +[Unit] +Description=Display Manager +After=syslog.target dbus.target hald.service + +[Service] +ExecStart=/etc/init.d/xdm start + +[Install] +Alias=display-manager.service +WantedBy=graphical.target diff -Naur systemd-9/units/multi-user.target.m4 systemd-9-magellan/units/multi-user.target.m4 --- systemd-9/units/multi-user.target.m4 2010-08-30 23:03:58.000000000 +0200 +++ systemd-9-magellan/units/multi-user.target.m4 2010-09-15 15:48:04.000000000 +0200 @@ -20,6 +20,9 @@ m4_ifdef(`TARGET_SUSE', Names=runlevel3.target )m4_dnl +m4_ifdef(`TARGET_MAGELLAN', +Names=runlevel3.target +)m4_dnl AllowIsolate=yes [Install]