Subversion Repositories DevTools

Rev

Rev 4900 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4900 Rev 6014
Line 86... Line 86...
86
 
86
 
87
#
87
#
88
#   Self install and removal
88
#   Self install and removal
89
#   Normally run from the installer
89
#   Normally run from the installer
90
#
90
#
-
 
91
kdeScriptCfg=/.kde/share/config/configureVM
91
if [ "$startupMode" = "install" ] ; then
92
if [ "$startupMode" = "install" ] ; then
92
    ln -s $0 /root/Desktop/configureVM
93
    ln -s $0 /root/Desktop/configureVM
93
    rm -f /root/.vix/config
94
    rm -f /root/.vix/config
94
    createHelpText
95
    createHelpText
-
 
96
    rm -f $kdeScriptCfg
95
    exit 0
97
    exit 0
96
elif [ "$startupMode" = "remove" ] ; then
98
elif [ "$startupMode" = "remove" ] ; then
97
    rm -f /root/Desktop/configureVM*
99
    rm -f /root/Desktop/configureVM*
98
    rm -rf /root/.vix
100
    rm -rf /root/.vix
-
 
101
    rm -f $kdeScriptCfg
99
    exit 0
102
    exit 0
100
fi
103
fi
101
 
104
 
102
#
105
#
103
#   Non Manual: Only run once
106
#   Non Manual: Only run once
104
#
107
#
105
[ -z "$startupMode" -a -f /root/.vix/config ] && exit
108
if [ -z "$startupMode" -a -f /root/.vix/config ]; then
-
 
109
  #
-
 
110
  # Non Manual: After first time
-
 
111
  #
-
 
112
  # Display the OS Type
-
 
113
  #             Machine Name
-
 
114
  #             IP Address
-
 
115
  #
-
 
116
  # Allows users to determine the IP address to:
-
 
117
  #     Simplify ssh access
-
 
118
  #     Show when it doesnot have an IP address
-
 
119
  ipaddress=$(/sbin/ifconfig | grep "inet addr" | grep -v "127.0.0.1" | awk '{ print $2 }' | awk -F: '{ print $2 }')
-
 
120
  text="
-
 
121
OS Version: $(lsb_release -sd)
-
 
122
HostName: $(hostname)
-
 
123
IP address: $ipaddress
-
 
124
 
-
 
125
Continue to login"
-
 
126
  # May create /.kde/share/config/configureVM ($kdeScriptCfg)
-
 
127
  kdialog --msgbox "$text" --dontagain configureVM:noipaddressmsg
-
 
128
  exit
-
 
129
fi  
-
 
130
rm -f $kdeScriptCfg
106
 
131
 
107
#
132
#
108
#   Running full script
133
#   Running full script
109
#   Perform full logging to another log file
134
#   Perform full logging to another log file
110
mkdir -p /root/.vix
135
mkdir -p /root/.vix