Quellcode durchsuchen

Provide further install instructions within motd

Bob Mottram vor 10 Jahren
Ursprung
Commit
f974ec448b
1 geänderte Dateien mit 33 neuen und 35 gelöschten Zeilen
  1. 33
    35
      src/freedombone-prep

+ 33
- 35
src/freedombone-prep Datei anzeigen

145
 sudo sed -i 's/nameserver.*/nameserver 213.73.91.35/g' $MICROSD_MOUNT_POINT/rootfs/etc/resolv.conf
145
 sudo sed -i 's/nameserver.*/nameserver 213.73.91.35/g' $MICROSD_MOUNT_POINT/rootfs/etc/resolv.conf
146
 sudo sed -i '/nameserver 213.73.91.35/a\nameserver 85.214.20.141' $MICROSD_MOUNT_POINT/rootfs/etc/resolv.conf
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
 clear
179
 clear
149
 echo '*** Initial microSD card setup is complete ***'
180
 echo '*** Initial microSD card setup is complete ***'
150
 echo ''
181
 echo ''
153
 echo ''
184
 echo ''
154
 echo "    ssh debian@$BBB_FIXED_IP_ADDRESS"
185
 echo "    ssh debian@$BBB_FIXED_IP_ADDRESS"
155
 echo ''
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
 exit 0
189
 exit 0