Bryan Kearney
2009-Jan-08 19:18 UTC
[Ovirt-devel] [PATCH node] Allow the menu to be ordered based on prepending XX_ onto the front of the symlinks
--- ovirt-node.spec.in | 12 ++++++------ scripts/ovirt-config-setup | 6 ++++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/ovirt-node.spec.in b/ovirt-node.spec.in index 72b35f2..b292c3e 100644 --- a/ovirt-node.spec.in +++ b/ovirt-node.spec.in @@ -186,12 +186,12 @@ install -p -m 644 images/syslinux-vesa-splash.jpg %{buildroot}/usr/lib/anaconda- # default ovirt-config-setup menu options %{__install} -d -m0755 %{buildroot}%{_sysconfdir}/ovirt-config-setup.d -%{__ln_s} ../..%{_sbindir}/ovirt-config-networking %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"Networking Setup" -%{__ln_s} ../..%{_sbindir}/ovirt-config-storage %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"Disk Partitioning" -%{__ln_s} ../..%{_sbindir}/ovirt-config-hostname %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"Set Hostname" -%{__ln_s} ../..%{_sbindir}/ovirt-config-logging %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"Logging Setup" -%{__ln_s} ../..%{_sbindir}/ovirt-config-password %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"Administrator Password" -%{__ln_s} ../..%{_sbindir}/ovirt-config-boot %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"Local install and reboot" +%{__ln_s} ../..%{_sbindir}/ovirt-config-networking %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"15_Networking Setup" +%{__ln_s} ../..%{_sbindir}/ovirt-config-storage %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"20_Disk Partitioning" +%{__ln_s} ../..%{_sbindir}/ovirt-config-hostname %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"10_Set Hostname" +%{__ln_s} ../..%{_sbindir}/ovirt-config-logging %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"30_Logging Setup" +%{__ln_s} ../..%{_sbindir}/ovirt-config-password %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"00_Administrator Password" +%{__ln_s} ../..%{_sbindir}/ovirt-config-boot %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"99_Local install and reboot" %clean diff --git a/scripts/ovirt-config-setup b/scripts/ovirt-config-setup index 9f97afc..9ee268f 100755 --- a/scripts/ovirt-config-setup +++ b/scripts/ovirt-config-setup @@ -13,10 +13,12 @@ declare -a OPTIONS for cfg in $CONFIG_DIR/*; do label=$(basename "$cfg") + # Assume label is actually XX_Some Text. So strip of the first 3 characters + label=${label:3} OPTIONS[${#OPTIONS[*]}]="$label" done -OPTIONS[${#OPTIONS[*]}]="$CONTINUE" OPTIONS[${#OPTIONS[*]}]="$DEBUG_SHELL" +OPTIONS[${#OPTIONS[*]}]="$CONTINUE" # reset tty, otherwise serial console is broken @@ -33,7 +35,7 @@ while true; do case "$OPTION" in "$DEBUG_SHELL") bash ; break ;; "$CONTINUE") exit 0 ;; - *) $CONFIG_DIR/"$OPTION" ;; + *) $CONFIG_DIR/*"$OPTION" ;; esac printf "\n" -- 1.6.0.6
Darryl L. Pierce
2009-Jan-08 19:58 UTC
[Ovirt-devel] [PATCH node] Allow the menu to be ordered based on prepending XX_ onto the front of the symlinks
On Thu, Jan 08, 2009 at 02:18:00PM -0500, Bryan Kearney wrote:> --- > ovirt-node.spec.in | 12 ++++++------ > scripts/ovirt-config-setup | 6 ++++-- > 2 files changed, 10 insertions(+), 8 deletions(-) > > diff --git a/ovirt-node.spec.in b/ovirt-node.spec.in > index 72b35f2..b292c3e 100644 > --- a/ovirt-node.spec.in > +++ b/ovirt-node.spec.in > @@ -186,12 +186,12 @@ install -p -m 644 images/syslinux-vesa-splash.jpg %{buildroot}/usr/lib/anaconda- > > # default ovirt-config-setup menu options > %{__install} -d -m0755 %{buildroot}%{_sysconfdir}/ovirt-config-setup.d > -%{__ln_s} ../..%{_sbindir}/ovirt-config-networking %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"Networking Setup" > -%{__ln_s} ../..%{_sbindir}/ovirt-config-storage %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"Disk Partitioning" > -%{__ln_s} ../..%{_sbindir}/ovirt-config-hostname %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"Set Hostname" > -%{__ln_s} ../..%{_sbindir}/ovirt-config-logging %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"Logging Setup" > -%{__ln_s} ../..%{_sbindir}/ovirt-config-password %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"Administrator Password" > -%{__ln_s} ../..%{_sbindir}/ovirt-config-boot %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"Local install and reboot" > +%{__ln_s} ../..%{_sbindir}/ovirt-config-networking %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"15_Networking Setup" > +%{__ln_s} ../..%{_sbindir}/ovirt-config-storage %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"20_Disk Partitioning" > +%{__ln_s} ../..%{_sbindir}/ovirt-config-hostname %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"10_Set Hostname" > +%{__ln_s} ../..%{_sbindir}/ovirt-config-logging %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"30_Logging Setup" > +%{__ln_s} ../..%{_sbindir}/ovirt-config-password %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"00_Administrator Password" > +%{__ln_s} ../..%{_sbindir}/ovirt-config-boot %{buildroot}%{_sysconfdir}/ovirt-config-setup.d/"99_Local install and reboot"ACK with one request: can we rearrange the above symlinks so that they're in order? -- Darryl L. Pierce, Sr. Software Engineer @ Red Hat, Inc. Virtual Machine Management - http://www.ovirt.org/ "What do you care what other people think, Mr. Feynman?" -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: not available URL: <http://listman.redhat.com/archives/ovirt-devel/attachments/20090108/75603edc/attachment.sig>