Sharvin
Posts: 17
Joined: Tue Feb 19, 2019 1:19 pm

Facing issues in configuring soft link for connman Directory ( Debian )

Fri Mar 01, 2019 12:09 pm

I am using a Debian OS. I have 4 Partitions on a disk.

mmcblk0p1 has the boot configuration.

mmcblk0p2 has a Debian Os. ( Let's name OS1 )

mmcblk0p3 has another Debian Os. ( Let's name OS2 )

mmcblk0p4 is persistent storage.

I am using connman as a network manager. Now all my networks that are connected are stored in /var/lib/connman/ directory. I want this directory to be available for both the OS1 and OS2. So my wifi Configuration from One Os can be available in Another OS.

I have created a Shared_Memory directory and mounted the persistent partition on /root/Shared_Memory. I have created soft links between the persistent storage and /var/lib/connman/ directory as follows:

Code: Select all

cp -a /var/lib/connman /root/Shared_Memory/var/lib/connman
rm -r /var/lib/connman
ln -s /root/Shared_Memory/var/lib/connman /var/lib/connman
Connman Directory Permission before creating the soft link:

Code: Select all

drwxr-xr-x 2 root root 4096 Mar 1 09:59 connman
connman/: directory
After creating soft link following are the Permission:

These are the permissions of the link in /var/lib/

Code: Select all

lrwxrwxrwx 1 root root 39 Mar 1 10:08 connman -> 
/root/Shared_Memory/var/lib/connman
connman: symbolic link to /root/Shared_Memory/var/lib/connman
These are the permissions of the directory in

Code: Select all

/root/Shared_Memory/var/lib/connman
drwxr-xr-x 2 root root 4096 Mar 1 09:52 connman
connman/: directory
Ownerships: These are the ownership of /root/Shared_Memory/var/lib/connman

Code: Select all

File: connman/
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: b309h/45833d    Inode: 16 Links: 2
Access: (0777/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2019-03-01 09:52:42.062722090 +0000
Modify: 2019-03-01 09:52:42.066722303 +0000
Change: 2019-03-01 10:38:46.355047993 +0000
Birth: -
These are the ownership of /var/lib/connman

Code: Select all

File: connman -> /root/Shared_Memory/var/lib/connman
Size: 39 Blocks: 0 IO Block: 4096 symbolic link
Device: b302h/45826d    Inode: 4653 Links: 1
Access: (0777/lrwxrwxrwx) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2019-03-01 10:08:49.976773001 +0000
Modify: 2019-03-01 10:08:49.976773001 +0000
Change: 2019-03-01 10:08:49.976773001 +0000
Birth: -
Did the same process in My OS2.

But When I connect to any Wifi suppose in OS1 and then boot to the OS2 there is no Wifi connected. ( According to my understanding it should connect to the Wifi that I have connected in OS1. )

So I tried the same process for a hostname which is located under /etc/hostname and in that case it is working perfectly.

Return to “Debian”