Commit d5cf1ff3 authored by Michael Shigorin's avatar Michael Shigorin

renamed menuitem-grub feature to relname

Its immediate purpose was influencing the GRUB boot menu *but* the implemented mechanism is actually a part of the long planned text branding and might be further merged into branding when hierarchical features finally chime in. So let's get the naming straight before it breeds.
parent f44908ca
......@@ -25,8 +25,8 @@ distro/live-gns3: distro/live-icewm
distro/server-systemd: distro/server-mini use/systemd
@$(call set,KFLAVOURS,std-def)
distro/server-test: distro/server-mini use/menuitem-grub
@$(call set,MENUITEM,TeSt-SeRVer)
distro/server-test: distro/server-mini use/relname
@$(call set,RELNALE,Test-Server)
# tiny network-only server-ovz installer (stage2 comes over net too)
distro/server-ovz-netinst: distro/.base sub/stage1 use/stage2 \
......
use/menuitem-grub:
@$(call add_feature)
@$(call xport,MENUITEM)
\ No newline at end of file
use/relname:
@$(call add_feature)
@$(call xport,RELNAME)
#!/bin/sh -efu
# create a postinstall script to some tuning
# create a postinstall script to perform the change afterwards
if [ -n "$GLOBAL_VERBOSE" ]; then
echo "** Change /etc/altlinux-release according to MENUITEM"
echo "** Change /etc/altlinux-release contents to '$RELNAME'"
fi >&2
SCRIPT="/usr/share/install2/postinstall.d/91-change-release"
SCRIPT="/usr/share/install2/postinstall.d/91-relname"
cat > "$SCRIPT" << EOF
#!/bin/sh
a= . install2-init-functions
exec_chroot sh -c 'sed -i "s,^.*,$GLOBAL_MENUITEM," /etc/altlinux-release'
exec_chroot sh -c 'echo "$GLOBAL_RELNAME" > /etc/altlinux-release'
exec_chroot sh -c 'grub-mkconfig -o /boot/grub/grub.cfg >&/dev/null ||:'
EOF
chmod +x "$SCRIPT"
ui gfxboot bootlogo message
menu title @menuitem@
menu title @relname@
prompt 0
ui menu.c32
menu title @menuitem@
menu title @relname@
prompt 0
ui vesamenu
menu title @menuitem@
menu title @relname@
prompt 0
label linux
menu label ^Install @menuitem@
menu label ^Install @relname@
kernel alt0/vmlinuz
append initrd=alt0/full.cz changedisk fastboot showopts automatic=method:cdrom ramdisk_size=@altinst_size@ vga=0x314 @bootargs@
......
label netinst
menu label Install @menuitem@ via inter^net
menu label Install @relname@ via inter^net
kernel alt0/vmlinuz
append initrd=alt0/full.cz fastboot showopts automatic=method:http,network:dhcp,server:ftp.linux.kiev.ua,directory:/pub/Linux/ALT/people/mike/iso/mkimage-profiles/netinst/server-ovz/x86_64 quiet=1 ramdisk_size=131072 vga=0x314
### hardwired parameters and strings should become dynamic someday
......
......@@ -3,7 +3,7 @@ use/syslinux: sub/stage1
@$(call add_feature)
@$(call add,STAGE1_PACKAGES,syslinux)
@$(call try,META_SYSTEM_ID,SYSLINUX)
@$(call set,MENUITEM,ALT Linux ($(IMAGE_NAME)))
@$(call set,RELNAME,ALT Linux ($(IMAGE_NAME)))
# UI is overwritten
use/syslinux/ui/%: use/syslinux
......
......@@ -53,7 +53,7 @@ all: debug timeout
@echo $(SYSLINUX_FILES) > $(DSTDIR)/syslinux.list
@sed -i \
-e 's,@mkimage-profiles@,$(IMAGE_NAME),' \
-e 's,@menuitem@,$(MENUITEM),' \
-e 's,@relname@,$(RELNAME),' \
$(DSTDIR)/*.cfg
# integerity check
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment