added menuitem-grub feature
This commit is contained in:
parent
a35b5fbc21
commit
8233aa8424
@ -25,7 +25,7 @@ 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
|
||||
distro/server-test: distro/server-mini use/menuitem-grub
|
||||
@$(call set,MENUITEM,TeSt-SeRVer)
|
||||
|
||||
# tiny network-only server-ovz installer (stage2 comes over net too)
|
||||
|
7
features.in/menuitem-grub/README
Normal file
7
features.in/menuitem-grub/README
Normal file
@ -0,0 +1,7 @@
|
||||
Эта фича изменяет пункты загрузки GRUB, в частности меняет содержимое
|
||||
файла /etc/altlinux-release в соответствии с установленной переменной
|
||||
MENUTITLE.
|
||||
Внимание! Меняются значения altlinux-release внесенные branding-ом, в
|
||||
этом ее основная задача.
|
||||
|
||||
|
3
features.in/menuitem-grub/config.mk
Normal file
3
features.in/menuitem-grub/config.mk
Normal file
@ -0,0 +1,3 @@
|
||||
use/menuitem-grub:
|
||||
@$(call add_feature)
|
||||
@$(call xport,MENUITEM)
|
17
features.in/menuitem-grub/stage2/image-scripts.d/91-change-release
Executable file
17
features.in/menuitem-grub/stage2/image-scripts.d/91-change-release
Executable file
@ -0,0 +1,17 @@
|
||||
#!/bin/sh -efu
|
||||
# create a postinstall script to some tuning
|
||||
|
||||
if [ -n "$GLOBAL_VERBOSE" ]; then
|
||||
echo "** Change altlinux-release accirding to MENUITEM"
|
||||
fi >&2
|
||||
|
||||
SCRIPT="/usr/share/install2/postinstall.d/91-change-release"
|
||||
cat > "$SCRIPT" << EOF
|
||||
|
||||
a= . install2-init-functions
|
||||
|
||||
exec_chroot sh -c 'sed -i "s,^.*,$GLOBAL_MENUITEM," /etc/altlinux-release'
|
||||
exec_chroot sh -c 'grub-mkconfig -o /boot/grub/grub.cfg'
|
||||
|
||||
EOF
|
||||
chmod +x "$SCRIPT"
|
Loading…
x
Reference in New Issue
Block a user