From: Carsten Schlote <[email protected]> We needed some to find out about the current build release, so we added the These contain the same info as the banner, so we changed the banner to use it.
Banner is no longer composed in initmethod, but roofs packet now provides /etc/ptxdist-[version|vendor} files. Signed-off-by: Carsten Schlote <[email protected]> --- generic/etc/init.d/banner | 11 ++++++----- generic/etc/ptxdist_vendor | 1 + generic/etc/ptxdist_version | 1 + rules/initmethod-bbinit.make | 21 --------------------- rules/rootfs.make | 25 +++++++++++++++++++++++++ 5 files changed, 33 insertions(+), 26 deletions(-) create mode 100644 generic/etc/ptxdist_vendor create mode 100644 generic/etc/ptxdist_version diff --git a/generic/etc/init.d/banner b/generic/etc/init.d/banner index 964c666..64ff14e 100644 --- a/generic/etc/init.d/banner +++ b/generic/etc/init.d/banner @@ -2,7 +2,8 @@ # # /etc/init.d/banner # - +PTXVERSION=$(cat /etc/ptxdist_version) +PTXVENDOR=$(cat /etc/ptxdist_vendor) FIGLET="/usr/bin/figlet" FIGLET_FONTS="/usr/share/figlet" PATH=/sbin:/bin:/usr/bin @@ -11,13 +12,13 @@ test -f $FIGLET || { echo "$FIGLET not found" >&2 ; exit 1; } start_proc() { echo - echo "OSELAS(R)-...@project@@PRJVERSION@ (@ptxd...@-@vers...@.@patchle...@.@SUBLEVEL@@EXTRAVERSION@/@DATE@)" + echo $PTXVERSION echo host=`/bin/hostname` - if [ -n "@VENDOR@" ]; then - ${FIGLET} -w 0 -f "${FIGLET_FONTS}/standard" "@VENDOR@" + if [ ! -n "$PTXVENDOR" ]; then + PTXVENDOR="$host" fi - ${FIGLET} -w 0 -f "${FIGLET_FONTS}/standard" "$host" + ${FIGLET} -w 0 -f "${FIGLET_FONTS}/standard" "$PTXVENDOR" echo echo } diff --git a/generic/etc/ptxdist_vendor b/generic/etc/ptxdist_vendor new file mode 100644 index 0000000..d7a6f17 --- /dev/null +++ b/generic/etc/ptxdist_vendor @@ -0,0 +1 @@ +...@vendor@ diff --git a/generic/etc/ptxdist_version b/generic/etc/ptxdist_version new file mode 100644 index 0000000..c9a4c9d --- /dev/null +++ b/generic/etc/ptxdist_version @@ -0,0 +1 @@ +OSELAS(R)-...@project@@PRJVERSION@ (@ptxd...@-@vers...@.@patchle...@.@SUBLEVEL@@EXTRAVERSION@/@DATE@) diff --git a/rules/initmethod-bbinit.make b/rules/initmethod-bbinit.make index cd9c833..f5a79c0 100644 --- a/rules/initmethod-bbinit.make +++ b/rules/initmethod-bbinit.make @@ -91,27 +91,6 @@ $(STATEDIR)/initmethod-bbinit.targetinstall: # # ifdef PTXCONF_INITMETHOD_BBINIT_ETC_INITD_BANNER @$(call install_alternative, initmethod-bbinit, 0, 0, 0755, /etc/init.d/banner, n) - - @$(call install_replace, initmethod-bbinit, /etc/init.d/banner, \ - @PROJECT@, $(PTXCONF_PROJECT)) - @$(call install_replace, initmethod-bbinit, /etc/init.d/banner, \ - @PRJVERSION@, $(PTXCONF_PROJECT_VERSION)) - - @$(call install_replace, initmethod-bbinit, /etc/init.d/banner, \ - @PTXDIST@, ptxdist) - @$(call install_replace, initmethod-bbinit, /etc/init.d/banner, \ - @VERSION@, $(PTXDIST_VERSION_YEAR)) - @$(call install_replace, initmethod-bbinit, /etc/init.d/banner, \ - @PATCHLEVEL@, $(PTXDIST_VERSION_MONTH)) - @$(call install_replace, initmethod-bbinit, /etc/init.d/banner, \ - @SUBLEVEL@, $(PTXDIST_VERSION_BUGFIX)) - @$(call install_replace, initmethod-bbinit, /etc/init.d/banner, \ - @EXTRAVERSION@, $(PTXDIST_VERSION_SCM)) - @$(call install_replace, initmethod-bbinit, /etc/init.d/banner, \ - @DATE@, $(shell date -Iseconds)) - - @$(call install_replace, initmethod-bbinit, /etc/init.d/banner, \ - @VENDOR@, $(PTXCONF_PROJECT_VENDOR)) endif ifdef PTXCONF_INITMETHOD_BBINIT_ETC_INITD_MODULES diff --git a/rules/rootfs.make b/rules/rootfs.make index 244fdce..eb7c11e 100644 --- a/rules/rootfs.make +++ b/rules/rootfs.make @@ -216,6 +216,31 @@ ifdef PTXCONF_ROOTFS_SERVICES @$(call install_alternative, rootfs, 0, 0, 0644, /etc/services) endif + # PTXDist version tag + + @$(call install_alternative, rootfs, 0, 0, 0644, /etc/ptxdist_version, n) + @$(call install_replace, rootfs, /etc/ptxdist_version, \ + @PROJECT@, $(PTXCONF_PROJECT)) + @$(call install_replace, rootfs, /etc/ptxdist_version, \ + @PRJVERSION@, $(PTXCONF_PROJECT_VERSION)) + + @$(call install_replace, rootfs, /etc/ptxdist_version, \ + @PTXDIST@, ptxdist) + @$(call install_replace, rootfs, /etc/ptxdist_version, \ + @VERSION@, $(PTXDIST_VERSION_YEAR)) + @$(call install_replace, rootfs, /etc/ptxdist_version, \ + @PATCHLEVEL@, $(PTXDIST_VERSION_MONTH)) + @$(call install_replace, rootfs, /etc/ptxdist_version, \ + @SUBLEVEL@, $(PTXDIST_VERSION_BUGFIX)) + @$(call install_replace, rootfs, /etc/ptxdist_version, \ + @EXTRAVERSION@, $(PTXDIST_VERSION_SCM)) + @$(call install_replace, rootfs, /etc/ptxdist_version, \ + @DATE@, $(shell date -Iseconds)) + + @$(call install_alternative, rootfs, 0, 0, 0644, /etc/ptxdist_vendor, n) + @$(call install_replace, rootfs, /etc/ptxdist_vendor, \ + @VENDOR@, $(PTXCONF_PROJECT_VENDOR)) + @$(call install_finish, rootfs) @$(call touch) -- 1.6.5.6.gb3118 -- ptxdist mailing list [email protected]
