Subversion Repositories DevTools

Rev

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

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