Browse Source

Provide further install instructions within motd

Bob Mottram 10 years ago
parent
commit
f974ec448b
1 changed files with 33 additions and 35 deletions
  1. 33
    35
      src/freedombone-prep

+ 33
- 35
src/freedombone-prep View File

@@ -145,6 +145,37 @@ sudo sed -i '/iface usb0 inet static/,/    gateway 192.168.7.1/ s/^/#/' $MICROSD
145 145
 sudo sed -i 's/nameserver.*/nameserver 213.73.91.35/g' $MICROSD_MOUNT_POINT/rootfs/etc/resolv.conf
146 146
 sudo sed -i '/nameserver 213.73.91.35/a\nameserver 85.214.20.141' $MICROSD_MOUNT_POINT/rootfs/etc/resolv.conf
147 147
 
148
+# change the motd to show further install instructions
149
+echo 'Become the root user by typing:' > $MICROSD_MOUNT_POINT/rootfs/etc/motd
150
+echo '' >> $MICROSD_MOUNT_POINT/rootfs/etc/motd
151
+echo '    su' >> $MICROSD_MOUNT_POINT/rootfs/etc/motd
152
+echo '' >> $MICROSD_MOUNT_POINT/rootfs/etc/motd
153
+echo 'Using the password "root". Change the root user password by typing:' >> $MICROSD_MOUNT_POINT/rootfs/etc/motd
154
+echo '' >> $MICROSD_MOUNT_POINT/rootfs/etc/motd
155
+echo '    passwd' >> $MICROSD_MOUNT_POINT/rootfs/etc/motd
156
+echo '' >> $MICROSD_MOUNT_POINT/rootfs/etc/motd
157
+echo 'Then create a user for the system with:' >> $MICROSD_MOUNT_POINT/rootfs/etc/motd
158
+echo '' >> $MICROSD_MOUNT_POINT/rootfs/etc/motd
159
+echo '    adduser [username]' >> $MICROSD_MOUNT_POINT/rootfs/etc/motd
160
+echo '' >> $MICROSD_MOUNT_POINT/rootfs/etc/motd
161
+echo 'Enter the command "exit" a couple of times to get back to your main system' >> $MICROSD_MOUNT_POINT/rootfs/etc/motd
162
+echo 'then log back in as the user you just created with:' >> $MICROSD_MOUNT_POINT/rootfs/etc/motd
163
+echo '' >> $MICROSD_MOUNT_POINT/rootfs/etc/motd
164
+echo '    ssh [username]@$BBB_FIXED_IP_ADDRESS' >> $MICROSD_MOUNT_POINT/rootfs/etc/motd
165
+echo '' >> $MICROSD_MOUNT_POINT/rootfs/etc/motd
166
+echo 'and use the "su" command to become the root user again. You can then load' >> $MICROSD_MOUNT_POINT/rootfs/etc/motd
167
+echo 'the freedombone main installation script with:' >> $MICROSD_MOUNT_POINT/rootfs/etc/motd
168
+echo '' >> $MICROSD_MOUNT_POINT/rootfs/etc/motd
169
+echo '    apt-get update' >> $MICROSD_MOUNT_POINT/rootfs/etc/motd
170
+echo '    apt-get -y install git dialog build-essential' >> $MICROSD_MOUNT_POINT/rootfs/etc/motd
171
+echo '    git clone https://github.com/bashrc/freedombone.git' >> $MICROSD_MOUNT_POINT/rootfs/etc/motd
172
+echo '    cd freedombone' >> $MICROSD_MOUNT_POINT/rootfs/etc/motd
173
+echo '    make install' >> $MICROSD_MOUNT_POINT/rootfs/etc/motd
174
+echo '' >> $MICROSD_MOUNT_POINT/rootfs/etc/motd
175
+echo 'Finally you can use the freedombone command to install a server configuration:' >> $MICROSD_MOUNT_POINT/rootfs/etc/motd
176
+echo '' >> $MICROSD_MOUNT_POINT/rootfs/etc/motd
177
+echo '    freedombone menuconfig' >> $MICROSD_MOUNT_POINT/rootfs/etc/motd
178
+
148 179
 clear
149 180
 echo '*** Initial microSD card setup is complete ***'
150 181
 echo ''
@@ -153,39 +184,6 @@ echo 'Once the Beaglebone has booted then you can log in with:'
153 184
 echo ''
154 185
 echo "    ssh debian@$BBB_FIXED_IP_ADDRESS"
155 186
 echo ''
156
-echo 'The password is "temppwd". You can then become the root user by typing:'
157
-echo ''
158
-echo '    su'
159
-echo ''
160
-echo 'Using the password "root". Change the root user password by typing:'
161
-echo ''
162
-echo '    passwd'
163
-echo ''
164
-echo "If you can't log in as root then try typing 'exit' and then:"
165
-echo ''
166
-echo "    ssh root@$BBB_FIXED_IP_ADDRESS"
167
-echo ''
168
-echo 'Then create a user for the system with:'
169
-echo ''
170
-echo '    adduser [username]'
171
-echo ''
172
-echo 'Enter the command "exit" a couple of times to get back to your main system'
173
-echo 'then log back in as the user you just created with:'
174
-echo ''
175
-echo '    ssh [username]@$BBB_FIXED_IP_ADDRESS'
176
-echo ''
177
-echo 'and use the "su" command to become the root user again. You can then load'
178
-echo 'the freedombone main installation script with:'
179
-echo ''
180
-echo '    apt-get update'
181
-echo '    apt-get -y install git dialog build-essential'
182
-echo '    git clone https://github.com/bashrc/freedombone.git'
183
-echo '    cd freedombone'
184
-echo '    make install'
185
-echo ''
186
-echo 'Finally you can use the freedombone command to install a server configuration:'
187
-echo ''
188
-echo '    freedombone menuconfig'
189
-echo ''
190
-echo 'See the manpage for more information on how to use the freedombone command.'
187
+echo 'The password is "temppwd".'
188
+cat $MICROSD_MOUNT_POINT/rootfs/etc/motd
191 189
 exit 0