The Windows 7 box. It works as is with Windows 10.
I like the sound of "cifs". I will check it out. Thank you.
-update-
hmmm Porteus has a mount.cifs command.
The Windows 7 box. It works as is with Windows 10.
I like the sound of "cifs". I will check it out. Thank you.
That something is a simple http webserver build into python 2 or 3 serving the current working directory and its subdirs.
Code: Select all
serve -qr
Code: Select all
su
usm -u all
usm -g qrencode
Code: Select all
# put in: ~/.bashrc
myip-lan()
{
if type nmcli 1>/dev/null 2>&1; then
ip=$(nmcli -p device show|grep -i 'IP4\.ADDRESS'|grep -v '127\.0\.0\.1'|sed 's;/24;;g'|awk '{print $2}');
elif type /sbin/ip 1>/dev/null 2>&1; then
ip=$(/sbin/ip a|grep "inet "|grep -iv "host lo"|sed 's;/24;;g'|awk '{print $2}')
elif type cygstart.exe 1>/dev/null 2>&1; then
ip=$(ipconfig|grep -i 'IPv4 Address'|head -1|sed 's/^[^:]*://g')
fi
# remove all whitespace characters from possible unclean output in ip variable
ip="$(echo -e "$ip" | tr -d '[:space:]')"
echo $ip
}
serve()
{
url="http://$(myip-lan):8000"
echo "---------------------------"
echo "Connect to:"
echo "$url"
echo "---------------------------"
echo ""
if [ "$1" == "-qr" ]; then
if command -v qrencode >/dev/null 2>&1; then
png="/tmp/serve-url-qrcode.png"
qrencode -o "$png" "$url"
command -v xdg-open >/dev/null 2>&1 && xdg-open "$png" &
command -v cygstart.exe >/dev/null 2>&1 && cygstart.exe "$png" &
else
printf >&2 "\n-----\nMISSING qrencode, no qr code generated!\n-----\n"
fi;
fi
if command -v python3 >/dev/null 2>&1; then
python3 -m http.server;
elif command -v python2 >/dev/null 2>&1; then
python2 -m SimpleHTTPServer;
fi
}
Code: Select all
mount -t cifs //my.host/mydir -o user=,password= /mnt/samba
Thank you Shadow0815. I will try this the next time I have the Windows 7 system up. The cifs and umount system works without my having to add anything to my Porteus or Windows 7 systems.Shadow0815 wrote: ↑03 Oct 2019, 23:45https://www.thinkplexx.com/learn/howto/ ... t-passwordCode: Select all
mount -t cifs //my.host/mydir -o user=,password= /mnt/samba
Code: Select all
mount.cifs $REMOTE -o user=,password= $LOCAL
cp $UPLOAD/$FILE $LOCAL/
umount $LOCAL
What did I do wrong?Shadow0815 wrote: ↑03 Oct 2019, 23:45My bash-snippet was tested under Porteus and Windows7 with Cygwin
Code: Select all
guest@porteus:~$ su
Password:
root@porteus:/home/guest# ls /.bashrc
/bin/ls: cannot access '/.bashrc': No such file or directory
root@porteus:/home/guest# myip-lan()
> {
> if type nmcli 1>/dev/null 2>&1; then
>
Display all 2587 possibilities? (y or n)
> mcli -p device show|grep -i 'IP4\.ADDRESS'|grep -v '127\.0\.0\.1'|sed 's;/24;;g'|awk '{print $2}');
bash: syntax error near unexpected token `)'
root@porteus:/home/guest# elif type /sbin/ip 1>/dev/null 2>&1; then
bash: syntax error near unexpected token `elif'
root@porteus:/home/guest#
Display all 2587 possibilities? (y or n)
root@porteus:/home/guest# /ip a|grep "inet "|grep -iv "host lo"|sed 's;/24;;g'|awk '{print $2}')
bash: syntax error near unexpected token `)'
root@porteus:/home/guest# elif type cygstart.exe 1>/dev/null 2>&1; then
bash: syntax error near unexpected token `elif'
root@porteus:/home/guest#
Display all 2587 possibilities? (y or n)
root@porteus:/home/guest# fig|grep -i 'IPv4 Address'|head -1|sed 's/^[^:]*://g')bash: syntax error near unexpected token `)'
root@porteus:/home/guest# fi
bash: syntax error near unexpected token `fi'
root@porteus:/home/guest# # remove all whitespace characters from possible unclean output in ip variable
root@porteus:/home/guest# ip="$(echo -e "$ip" | tr -d '[:space:]')"
root@porteus:/home/guest# echo $ip
root@porteus:/home/guest# }
bash: syntax error near unexpected token `}'
root@porteus:/home/guest#
root@porteus:/home/guest#
root@porteus:/home/guest# serve()
> {
> url="http://$(myip-lan):8000"
> echo "---------------------------"
> echo "Connect to:"
> echo "$url"
> echo "---------------------------"
> echo ""
>
> if [ "$1" == "-qr" ]; then
> if command -v qrencode >/dev/null 2>&1; then
>
Display all 2587 possibilities? (y or n)
> g="/tmp/serve-url-qrcode.png"
>
Display all 2587 possibilities? (y or n)
> code -o "$png" "$url"
>
Display all 2587 possibilities? (y or n)
> d -v xdg-open >/dev/null 2>&1 && xdg-open "$png" &
>
Display all 2587 possibilities? (y or n)
> d -v cygstart.exe >/dev/null 2>&1 && cygstart.exe "$png" &
>
Display all 2587 possibilities? (y or n)
> tf >&2 "\n-----\nMISSING qrencode, no qr code generated!\n-----\n"
bash: !\n: event not found
> fi;
> fi
>
> if command -v python3 >/dev/null 2>&1; then
> python3 -m http.server;
> elif command -v python2 >/dev/null 2>&1; then
>
Display all 2587 possibilities? (y or n)
! mkfs.ext4
./ mkfs.ext4dev
2to3 mkfs.f2fs
2to3-3.6 mkfs.fat
7z mkfs.minix
7zFM mkfs.msdos
7zG mkfs.ntfs
7za mkfs.reiserfs
7zr mkfs.vfat
: mkfs.xfs
Client7z mkhomedir_helper
ControlPanel mkhybrid
LzmaCon mkisofs
ModemManager mklost+found
NetworkManager mkmanifest
X mknod
Xdialog mkntfs
Xorg mkpasswd
Xvnc mkreiserfs
[ mksquashfs
[[ mkswap
]] mktemp
a52dec mktemp-gnu
> 2 -m SimpleHTTPServer;
> fi
> }
Code: Select all
root@porteus:/home/guest# usm -i qrencode
The following items were found.
Choose an number to confirm.
ctrl+c to quit
1) qrencode-3.4.4-x86_64-1alien.txz 3) qrencode-3.4.2-x86_64-1_slonly.txz
2) qrencode-4.0.2-x86_64-1ponce.txz
#? 1
Package: qrencode-3.4.4-x86_64-1alien.txz (56 K) [not installed]
qrencode: qrencode (library for encoding data into QR Code)
qrencode:
qrencode: Libqrencode is a library for encoding data in a QR Code symbol,
qrencode: a kind of 2D symbology that can be scanned by handy terminals such as
qrencode: a mobile phone with CCD.
qrencode: The capacity of QR Code is up to 7000 digits or 4000 characters,
qrencode: and has high robustness.
qrencode:
qrencode:
qrencode: qrencode home: http://fukuchi.org/works/qrencode/index.en.html
qrencode:
root@porteus:/home/guest#