Commit 3d649db6 authored by Michael Shigorin's avatar Michael Shigorin

live: introduce homepage redirector knobs

There are three more variables to adjust the redirect page: HOMEPAGE, HOMENAME and HOMEWAIT; e.g. live-webkiosk is now quite a bit more whitelabel.
parent b5e6906b
......@@ -55,6 +55,11 @@
+ значение: пусто (по умолчанию), 1 или 2
+ см. ../lib/log.mk
- HOMEPAGE, HOMENAME, HOMEWAIT
+ указывают адрес, название и таймаут перехода для домашней страницы
+ значение: корректный URL, строка, целое неотрицательное число
+ см. ../features.in/live/generate.mk (тж. по умолчаниям)
- ISOHYBRID
+ включает постобработку ISO-образа isohybrid
+ значение: пусто (по умолчанию) либо любая строка
......
Эта фича дополняет базовый "живой" образ второй стадии
специфическими для полноценного LiveCD настройками
и скриптовыми хуками.
и скриптовыми хуками, а также создаёт файл index.html
с домашней страницей (редиректором) в корне образа.
# set up livecd browser redirection page
ifdef BUILDDIR
include $(BUILDDIR)/distcfg.mk
ifndef HOMEPAGE
HOMEPAGE = http://www.altlinux.org/
endif
ifndef HOMENAME
HOMENAME = ALT Linux
endif
ifndef HOMEWAIT
HOMEWAIT = 3
endif
INDEXHTML := $(BUILDDIR)/stage1/files/index.html
all: debug
@if [ -s "$(INDEXHTML)" ]; then \
sed -i \
-e 's,@homepage@,$(HOMEPAGE),' \
-e 's,@homename@,$(HOMENAME),' \
-e 's,@homewait@,$(HOMEWAIT),' \
$(INDEXHTML); \
fi
debug:
@if [ -n "$(DEBUG)" ]; then \
echo "** HOMEPAGE: $(HOMEPAGE)"; \
echo "** HOMENAME: $(HOMENAME)"; \
echo "** HOMEWAIT: $(HOMEWAIT)"; \
fi
endif
<html>
<head>
<meta http-equiv="refresh" content="3;url=http://www.altlinux.org/">
<title>Welcome to ALT Linux!</title>
<meta http-equiv="refresh" content="@homewait@;url=@homepage@">
<title>Welcome to @homename@!</title>
</head>
<body>
<h1>Welcome to ALT Linux!</h1>
<p>You will be redirected to <a href="http://www.altlinux.org/">the home page</a> shortly.</p>
<h1>Welcome to @homename@!</h1>
<p>You will be redirected to <a href="@homepage@">the home page</a> shortly.</p>
</body>
</html>
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