Fix check_release, menu_launch_type, start_cockpit

I accidentally left the `my $self = shift` lines in these when
changing them from methods into functions, so they don't work
right at all. Whoops. Sorry.
This commit is contained in:
Adam Williamson 2017-01-26 14:32:42 +01:00
parent cf9fa890fa
commit e5dc67126d

View File

@ -245,7 +245,6 @@ sub check_release {
# Fedora 23. The value can be 'Rawhide' or a Fedora release # Fedora 23. The value can be 'Rawhide' or a Fedora release
# number; often you will want to use `get_var('VERSION')`. Expects # number; often you will want to use `get_var('VERSION')`. Expects
# a console prompt to be active when it is called. # a console prompt to be active when it is called.
my $self = shift;
my $release = shift; my $release = shift;
my $check_command = "grep SUPPORT_PRODUCT_VERSION /usr/lib/os.release.d/os-release-fedora"; my $check_command = "grep SUPPORT_PRODUCT_VERSION /usr/lib/os.release.d/os-release-fedora";
validate_script_output $check_command, sub { $_ =~ m/REDHAT_SUPPORT_PRODUCT_VERSION=$release/ }; validate_script_output $check_command, sub { $_ =~ m/REDHAT_SUPPORT_PRODUCT_VERSION=$release/ };
@ -255,7 +254,6 @@ sub menu_launch_type {
# Launch an application in a graphical environment, by opening a # Launch an application in a graphical environment, by opening a
# launcher, typing the specified string and hitting enter. Pass # launcher, typing the specified string and hitting enter. Pass
# the string to be typed to launch whatever it is you want. # the string to be typed to launch whatever it is you want.
my $self = shift;
my $app = shift; my $app = shift;
# super does not work on KDE, because fml # super does not work on KDE, because fml
send_key 'alt-f1'; send_key 'alt-f1';
@ -269,7 +267,6 @@ sub start_cockpit {
# Starting from a console, get to a browser with Cockpit (running # Starting from a console, get to a browser with Cockpit (running
# on localhost) shown. If $login is truth-y, also log in. Assumes # on localhost) shown. If $login is truth-y, also log in. Assumes
# X and Firefox are installed. # X and Firefox are installed.
my $self = shift;
my $login = shift || 0; my $login = shift || 0;
# run firefox directly in X as root. never do this, kids! # run firefox directly in X as root. never do this, kids!
type_string "startx /usr/bin/firefox -width 1024 -height 768 http://localhost:9090\n"; type_string "startx /usr/bin/firefox -width 1024 -height 768 http://localhost:9090\n";